/* Generated by Cython 0.18 on Fri Dec  6 10:01:19 2013 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__cyvcf__parser
#define __PYX_HAVE_API__cyvcf__parser
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))


#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "parser.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr;
struct __pyx_obj_5cyvcf_6parser__Call;
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample;
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr;
struct __pyx_obj_5cyvcf_6parser__Record;
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample;
struct __pyx_obj_5cyvcf_6parser_Reader;

/* "cyvcf/parser.pyx":1349
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "cyvcf/parser.pyx":120
 * 
 * 
 * cdef class _Call(object):             # <<<<<<<<<<<<<<
 *     """ A genotype call, a cell entry in a VCF file"""
 * 
 */
struct __pyx_obj_5cyvcf_6parser__Call {
  PyObject_HEAD
  PyObject *sample;
  PyObject *gt_nums;
  struct __pyx_obj_5cyvcf_6parser__Record *site;
  PyObject *data;
  int called;
  int phased;
};


/* "cyvcf/parser.pyx":422
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in self.INFO.items()])
 * 
 *     def _format_sample(self, sample):             # <<<<<<<<<<<<<<
 *         if sample.data["GT"] is None:
 *             return "./."
 */
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample {
  PyObject_HEAD
  PyObject *__pyx_v_sample;
  struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self;
};


/* "cyvcf/parser.pyx":425
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "cyvcf/parser.pyx":331
 * 
 * 
 * cdef class _Record(object):             # <<<<<<<<<<<<<<
 *     """ A set of calls at a site.  Equivalent to a line in a VCF file.
 * 
 */
struct __pyx_obj_5cyvcf_6parser__Record {
  PyObject_HEAD
  PyObject *alleles;
  PyObject *samples;
  PyObject *ALT;
  PyObject *gt_bases;
  PyObject *gt_types;
  PyObject *gt_phases;
  PyObject *gt_depths;
  PyObject *gt_ref_depths;
  PyObject *gt_alt_depths;
  PyObject *gt_quals;
  PyObject *CHROM;
  PyObject *ID;
  PyObject *REF;
  PyObject *FORMAT;
  PyObject *FILTER;
  PyObject *QUAL;
  int POS;
  int start;
  int end;
  int num_hom_ref;
  int num_het;
  int num_hom_alt;
  int num_unknown;
  int num_called;
  PyObject *INFO;
  PyObject *_sample_indexes;
  int has_genotypes;
};


/* "cyvcf/parser.pyx":1346
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])
 * 
 *     def _format_sample(self, fmt, sample):             # <<<<<<<<<<<<<<
 *         if sample.data["GT"] is None:
 *             return "./."
 */
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample {
  PyObject_HEAD
  PyObject *__pyx_v_fmt;
  PyObject *__pyx_v_sample;
  PyObject *__pyx_v_self;
};


/* "cyvcf/parser.pyx":808
 * 
 * 
 * cdef class Reader(object):             # <<<<<<<<<<<<<<
 * 
 *     """ Reader for a VCF v 4.1 file, an iterator returning ``_Record objects`` """
 */
struct __pyx_obj_5cyvcf_6parser_Reader {
  PyObject_HEAD
  PyObject *_col_defn_line;
  char _prepend_chr;
  PyObject *reader;
  int compressed;
  int prepend_chr;
  PyObject *metadata;
  PyObject *infos;
  PyObject *filters;
  PyObject *formats;
  PyObject *_sample_indexes;
  PyObject *_header_lines;
  PyObject *samples;
  PyObject *samp_data;
  PyObject *_tabix;
  PyObject *filename;
  int num_samples;
  struct __pyx_obj_5cyvcf_6parser__Record *curr_record;
};

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred())
            PyErr_SetObject(PyExc_KeyError, key);
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        PyObject *m;
        m = __Pyx_GetAttrString(d, "get");
        if (!m) return NULL;
        value = PyObject_CallFunctionObjArgs(m, key,
                                             (default_value == Py_None) ? NULL : default_value, NULL);
        Py_DECREF(m);
    }
#endif
    return value;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *qualname, PyObject *modname); /*proto*/

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
    int flags;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    PyObject *defaults_tuple; /* Const defaults tuple */
    PyObject *(*defaults_getter)(PyObject *);
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self, PyObject *module,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static int __Pyx_CyFunction_init(void);

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

#define __Pyx_Generator_USED
#include <structmember.h>
#include <frameobject.h>
typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_generator_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    int resume_label;
    char is_running;  // using T_BOOL for property below requires char value
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure);
static int __pyx_Generator_init(void);
static int __Pyx_Generator_clear(PyObject* self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static int __Pyx_check_binary_version(void);

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'cyvcf.parser' */
static PyTypeObject *__pyx_ptype_5cyvcf_6parser__Call = 0;
static PyTypeObject *__pyx_ptype_5cyvcf_6parser__Record = 0;
static PyTypeObject *__pyx_ptype_5cyvcf_6parser_Reader = 0;
static PyTypeObject *__pyx_ptype_5cyvcf_6parser___pyx_scope_struct___format_sample = 0;
static PyTypeObject *__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_2__format_sample = 0;
static PyTypeObject *__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_3_genexpr = 0;
#define __Pyx_MODULE_NAME "cyvcf.parser"
int __pyx_module_is_main_cyvcf__parser = 0;

/* Implementation of 'cyvcf.parser' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_SyntaxError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_cmp;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_file;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_xrange;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_2read_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info_string); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_4read_filter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter_string); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_6read_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format_string); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_8read_meta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_meta_string); /* proto */
static int __pyx_pf_5cyvcf_6parser_5_Call___cinit__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_site, char *__pyx_v_sample, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_2__repr__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6__getitem__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4site___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6sample___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6called___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4data___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6phased___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_8gt_bases(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_10gt_type(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_12gt_depth(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_14gt_ref_depth(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_16gt_alt_depth(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_18gt_qual(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_20is_variant(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_22is_het(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record___cinit__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, char *__pyx_v_CHROM, int __pyx_v_POS, char *__pyx_v_ID, char *__pyx_v_REF, PyObject *__pyx_v_ALT, PyObject *__pyx_v_QUAL, PyObject *__pyx_v_FILTER, PyObject *__pyx_v_INFO, PyObject *__pyx_v_FORMAT, PyObject *__pyx_v_sample_indexes, PyObject *__pyx_v_samples, PyObject *__pyx_v_gt_bases, PyObject *__pyx_v_gt_types, PyObject *__pyx_v_gt_phases, PyObject *__pyx_v_gt_depths, PyObject *__pyx_v_gt_ref_depths, PyObject *__pyx_v_gt_alt_depths, PyObject *__pyx_v_gt_quals, int __pyx_v_num_hom_ref, int __pyx_v_num_het, int __pyx_v_num_hom_alt, int __pyx_v_num_unknown, int __pyx_v_num_called); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_2__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4__iter__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_6_format_alt(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8_format_qual(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_10_format_info(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_14_format_sample_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_12_format_sample(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_sample); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_14_stringify(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_none); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_16_map(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, PyObject *__pyx_v_none); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_18__repr__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
#if PY_MAJOR_VERSION < 3
static int __pyx_pf_5cyvcf_6parser_7_Record_20__cmp__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
#endif
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_22add_format(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_fmt); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_24add_filter(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_flt); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_26add_info(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_info, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_28genotype(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_5CHROM___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3POS___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_2ID___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3REF___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3ALT___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4QUAL___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4INFO___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_6FILTER___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_6FORMAT___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_5start___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3end___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7alleles___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7samples___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8gt_bases___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8gt_types___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_9gt_phases___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_9gt_depths___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8gt_quals___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7num_het___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_unknown___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_10num_called___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_30call_rate(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_32aaf(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_34nucl_diversity(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_36get_hom_refs(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_38get_hom_alts(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_40get_hets(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_42get_unknowns(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_44is_snp(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_46is_indel(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_48is_sv(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_50is_transition(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_52is_deletion(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_54var_type(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_56var_subtype(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_58sv_end(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_60is_sv_precise(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_62is_monomorphic(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader___init__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_fsock, PyObject *__pyx_v_filename, int __pyx_v_compressed, int __pyx_v_prepend_chr); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_2__iter__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_4seek(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_6tell(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_8filename___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_7samples___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_7formats___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_5infos___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_7filters___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_8metadata___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_10raw_header___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_8_parse_metainfo(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_10_map(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, PyObject *__pyx_v_bad); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_12_parse_info(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_info_str); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_14_parse_samples(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_samples, char *__pyx_v_samp_fmt_s); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_16_parse_sample(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, char *__pyx_v_sample, PyObject *__pyx_v_samp_fmt, PyObject *__pyx_v_samp_fmt_types, PyObject *__pyx_v_samp_fmt_nums); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_18__next__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_20parse(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_other, PyObject *__pyx_v_line); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_22fetch(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_template); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_2_write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_4write_record(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_record); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_6_format_alt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_alt); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_8_format_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_14_format_sample_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_10_format_sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_sample); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_12_stringify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_none); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_14_map(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, PyObject *__pyx_v_none); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser___update_readme(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static char __pyx_k_1[] = "_vcf_metadata_parser";
static char __pyx_k_2[] = "\\#\\#INFO=<\n            ID=(?P<id>[^,]+),\n            Number=(?P<number>-?\\d+|\\.|[AG]),\n            Type=(?P<type>Integer|Float|Flag|Character|String),\n            Description=\"(?P<desc>[^\"]*)\"\n            >";
static char __pyx_k_3[] = "\\#\\#FILTER=<\n            ID=(?P<id>[^,]+),\n            Description=\"(?P<desc>[^\"]*)\"\n            >";
static char __pyx_k_4[] = "\\#\\#FORMAT=<\n            ID=(?P<id>.+),\n            Number=(?P<number>-?\\d+|\\.|[AG]),\n            Type=(?P<type>.+),\n            Description=\"(?P<desc>.*)\"\n            >";
static char __pyx_k_5[] = "##(?P<key>.+)=(?P<val>.+)";
static char __pyx_k_7[] = "One of the INFO lines is malformed: %s";
static char __pyx_k_13[] = "One of the FILTER lines is malformed: %s";
static char __pyx_k_17[] = "One of the FORMAT lines is malformed: %s";
static char __pyx_k_25[] = "|";
static char __pyx_k_27[] = "Call(sample=%s, GT=%s, GQ=%s)";
static char __pyx_k_28[] = "";
static char __pyx_k_29[] = "/";
static char __pyx_k_30[] = "Allele number not found in list of alleles\n";
static char __pyx_k_32[] = ",";
static char __pyx_k_33[] = ".";
static char __pyx_k_34[] = ";";
static char __pyx_k_35[] = "%s=%s";
static char __pyx_k_36[] = ":";
static char __pyx_k_38[] = "./.";
static char __pyx_k_39[] = "\t";
static char __pyx_k_41[] = "<>";
static char __pyx_k_43[] = "You must provide at least fsock or filename";
static char __pyx_k_45[] = ".gz";
static char __pyx_k_47[] = "##";
static char __pyx_k_49[] = "\n";
static char __pyx_k_51[] = "##INFO";
static char __pyx_k_53[] = "##FILTER";
static char __pyx_k_55[] = "##FORMAT";
static char __pyx_k_57[] = "#";
static char __pyx_k_59[] = "Expected column definition line beginning with #.  Not found - exiting.";
static char __pyx_k_62[] = "=";
static char __pyx_k_75[] = "pysam not available, try \"pip install pysam\"?";
static char __pyx_k_77[] = "Please provide a filename (or a \"normal\" fsock)";
static char __pyx_k_79[] = "##%s=%s\n";
static char __pyx_k_80[] = "##INFO=<ID=%s,Number=%s,Type=%s,Description=\"%s\">\n";
static char __pyx_k_81[] = "##FORMAT=<ID=%s,Number=%s,Type=%s,Description=\"%s\">\n";
static char __pyx_k_82[] = "##FILTER=<ID=%s,Description=\"%s\">\n";
static char __pyx_k_84[] = "README.rst";
static char __pyx_k_86[] = "Return the VCF _Record to which this _Call belongs";
static char __pyx_k_87[] = "Return the name of the sample";
static char __pyx_k_88[] = "The 0-based start coordinate for the variant.";
static char __pyx_k_89[] = "The 1-based end coordinate for the variant.";
static char __pyx_k_90[] = "A list of all of the alleles for this variant.\n           [0] = REF, [1:] = ALTS\n        ";
static char __pyx_k_91[] = "A list of Call instances: one for each sample";
static char __pyx_k_92[] = "A list of nucleotide genotypes for each sample.\n           E.g., ['A/G', 'A/A', 'G/G']\n        ";
static char __pyx_k_93[] = "A list of numerically-encoded genotypes for each sample.\n           0 = homozygous for the REF allele\n           1 = heterozygous for the reference allele and one of the ALTs\n           2 = homozygous for the ALT allele\n           -1 = unknown / uncalled genotype\n           E.g., ['A/G', 'A/A', 'G/G']\n        ";
static char __pyx_k_94[] = "A list of booleans indicating whether or not each genotype is phased.\n           E.g., were the genotypes as follows: ['A/G', 'A|A', 'G/G']\n           this would return [False, True, False]\n        ";
static char __pyx_k_95[] = "A list of integers indicating the depth of sequence coverage for\n           each genotype.\n        ";
static char __pyx_k_96[] = "A list of integers indicating the depth of sequence coverage for\n           the reference allele for each sample.\n        ";
static char __pyx_k_97[] = "A list of integers indicating the depth of sequence coverage for\n           the alternate allele for each sample.\n        ";
static char __pyx_k_98[] = "A list of integers indicating the PHRED scale genotype quality \n           for each sample.\n        ";
static char __pyx_k_99[] = "The number of homozygotes for the REF allele.";
static char __pyx_k__0[] = "0";
static char __pyx_k__A[] = "A";
static char __pyx_k__C[] = "C";
static char __pyx_k__G[] = "G";
static char __pyx_k__T[] = "T";
static char __pyx_k__w[] = "w";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
static char __pyx_k_100[] = "The number of heterozygotes.";
static char __pyx_k_101[] = "The number of homozygotes for an ALT allele.";
static char __pyx_k_102[] = "The number of unknown (e.g., ./.) genotypes.";
static char __pyx_k_103[] = "The number of called (i.e., NOT ./.) genotypes.";
static char __pyx_k_104[] = "The name of the VCF file that the Reader is reading.";
static char __pyx_k_105[] = "A list of the samples in this VCF file.";
static char __pyx_k_106[] = "A dict of FORMATS defined in this VCF file.";
static char __pyx_k_107[] = "A dict of INFO attrs defined in this VCF file.";
static char __pyx_k_108[] = "A dict of FILTER attrs defined in this VCF file.";
static char __pyx_k_109[] = "?";
static char __pyx_k_110[] = "Dump the raw, unparsed header lines";
static char __pyx_k_111[] = "samples, gt_bases,                                                     gt_types, gt_phases,                                                     gt_depths, gt_ref_depths,                                                     gt_alt_depths, gt_quals,                                                     num_hom_ref, num_het,                                                     num_hom_alt, num_unknown,                                                     num_called";
static char __pyx_k_115[] = "/Users/arq5x/Documents/SourceCode/quinlan/CyVCF/cyvcf/parser.pyx";
static char __pyx_k_116[] = "_vcf_metadata_parser.__init__";
static char __pyx_k_117[] = "cyvcf.parser";
static char __pyx_k_120[] = "_vcf_metadata_parser.read_info";
static char __pyx_k_123[] = "_vcf_metadata_parser.read_filter";
static char __pyx_k_126[] = "_vcf_metadata_parser.read_format";
static char __pyx_k_129[] = "_vcf_metadata_parser.read_meta";
static char __pyx_k_130[] = "Parse the metadat in the header of a VCF file.";
static char __pyx_k_131[] = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT";
static char __pyx_k_134[] = "Writer.__init__";
static char __pyx_k_137[] = "Writer._write_header";
static char __pyx_k_140[] = "Writer.write_record";
static char __pyx_k_143[] = "Writer._format_alt";
static char __pyx_k_146[] = "Writer._format_info";
static char __pyx_k_149[] = "Writer._format_sample";
static char __pyx_k_153[] = "Writer._stringify";
static char __pyx_k_157[] = "Writer._map";
static char __pyx_k_158[] = " VCF Writer ";
static char __pyx_k__AA[] = "AA";
static char __pyx_k__AC[] = "AC";
static char __pyx_k__AD[] = "AD";
static char __pyx_k__AF[] = "AF";
static char __pyx_k__AN[] = "AN";
static char __pyx_k__AO[] = "AO";
static char __pyx_k__BQ[] = "BQ";
static char __pyx_k__DB[] = "DB";
static char __pyx_k__DP[] = "DP";
static char __pyx_k__FT[] = "FT";
static char __pyx_k__GL[] = "GL";
static char __pyx_k__GQ[] = "GQ";
static char __pyx_k__GT[] = "GT";
static char __pyx_k__H2[] = "H2";
static char __pyx_k__HQ[] = "HQ";
static char __pyx_k__ID[] = "ID";
static char __pyx_k__MQ[] = "MQ";
static char __pyx_k__NS[] = "NS";
static char __pyx_k__RO[] = "RO";
static char __pyx_k__SB[] = "SB";
static char __pyx_k__id[] = "id";
static char __pyx_k__re[] = "re";
static char __pyx_k__sv[] = "sv";
static char __pyx_k__ts[] = "ts";
static char __pyx_k__tv[] = "tv";
static char __pyx_k__ALT[] = "ALT";
static char __pyx_k__BND[] = "BND";
static char __pyx_k__END[] = "END";
static char __pyx_k__HET[] = "HET";
static char __pyx_k__MQ0[] = "MQ0";
static char __pyx_k__POS[] = "POS";
static char __pyx_k__REF[] = "REF";
static char __pyx_k__aaf[] = "aaf";
static char __pyx_k__alt[] = "alt";
static char __pyx_k__bad[] = "bad";
static char __pyx_k__chr[] = "chr";
static char __pyx_k__cmp[] = "cmp";
static char __pyx_k__csv[] = "csv";
static char __pyx_k__del[] = "del";
static char __pyx_k__end[] = "end";
static char __pyx_k__ffs[] = "ffs";
static char __pyx_k__fmt[] = "fmt";
static char __pyx_k__ins[] = "ins";
static char __pyx_k__key[] = "key";
static char __pyx_k__num[] = "num";
static char __pyx_k__snp[] = "snp";
static char __pyx_k__sys[] = "sys";
static char __pyx_k__val[] = "val";
static char __pyx_k__vcf[] = "vcf";
static char __pyx_k__Flag[] = "Flag";
static char __pyx_k__INFO[] = "INFO";
static char __pyx_k__Info[] = "Info";
static char __pyx_k__PASS[] = "PASS";
static char __pyx_k__QUAL[] = "QUAL";
static char __pyx_k___map[] = "_map";
static char __pyx_k__data[] = "data";
static char __pyx_k__desc[] = "desc";
static char __pyx_k__exit[] = "exit";
static char __pyx_k__file[] = "file";
static char __pyx_k__filt[] = "filt";
static char __pyx_k__find[] = "find";
static char __pyx_k__form[] = "form";
static char __pyx_k__func[] = "func";
static char __pyx_k__gzip[] = "gzip";
static char __pyx_k__info[] = "info";
static char __pyx_k__izip[] = "izip";
static char __pyx_k__join[] = "join";
static char __pyx_k__line[] = "line";
static char __pyx_k__name[] = "name";
static char __pyx_k__next[] = "next";
static char __pyx_k__none[] = "none";
static char __pyx_k__seek[] = "seek";
static char __pyx_k__self[] = "self";
static char __pyx_k__site[] = "site";
static char __pyx_k__tell[] = "tell";
static char __pyx_k__type[] = "type";
static char __pyx_k__CHROM[] = "CHROM";
static char __pyx_k__CIGAR[] = "CIGAR";
static char __pyx_k__Float[] = "Float";
static char __pyx_k___Info[] = "_Info";
static char __pyx_k__chrom[] = "chrom";
static char __pyx_k__fetch[] = "fetch";
static char __pyx_k__fsock[] = "fsock";
static char __pyx_k__group[] = "group";
static char __pyx_k__indel[] = "indel";
static char __pyx_k__infos[] = "infos";
static char __pyx_k__is_sv[] = "is_sv";
static char __pyx_k__items[] = "items";
static char __pyx_k__match[] = "match";
static char __pyx_k__pysam[] = "pysam";
static char __pyx_k__range[] = "range";
static char __pyx_k__split[] = "split";
static char __pyx_k__start[] = "start";
static char __pyx_k__strip[] = "strip";
static char __pyx_k__super[] = "super";
static char __pyx_k__value[] = "value";
static char __pyx_k__write[] = "write";
static char __pyx_k__FILTER[] = "FILTER";
static char __pyx_k__FORMAT[] = "FORMAT";
static char __pyx_k__Filter[] = "Filter";
static char __pyx_k__Format[] = "Format";
static char __pyx_k__SVTYPE[] = "SVTYPE";
static char __pyx_k__String[] = "String";
static char __pyx_k__Writer[] = "Writer";
static char __pyx_k__extend[] = "extend";
static char __pyx_k__is_het[] = "is_het";
static char __pyx_k__is_snp[] = "is_snp";
static char __pyx_k__number[] = "number";
static char __pyx_k__object[] = "object";
static char __pyx_k__record[] = "record";
static char __pyx_k__rstrip[] = "rstrip";
static char __pyx_k__sample[] = "sample";
static char __pyx_k__stderr[] = "stderr";
static char __pyx_k__stream[] = "stream";
static char __pyx_k__sv_end[] = "sv_end";
static char __pyx_k__values[] = "values";
static char __pyx_k__writer[] = "writer";
static char __pyx_k__xrange[] = "xrange";
static char __pyx_k__HOM_ALT[] = "HOM_ALT";
static char __pyx_k__HOM_REF[] = "HOM_REF";
static char __pyx_k__Integer[] = "Integer";
static char __pyx_k__Numeric[] = "Numeric";
static char __pyx_k__SOMATIC[] = "SOMATIC";
static char __pyx_k__UNKNOWN[] = "UNKNOWN";
static char __pyx_k__VERBOSE[] = "VERBOSE";
static char __pyx_k___Filter[] = "_Filter";
static char __pyx_k___Format[] = "_Format";
static char __pyx_k____doc__[] = "__doc__";
static char __pyx_k__compile[] = "compile";
static char __pyx_k__complex[] = "complex";
static char __pyx_k__fileobj[] = "fileobj";
static char __pyx_k__filters[] = "filters";
static char __pyx_k__formats[] = "formats";
static char __pyx_k__genexpr[] = "genexpr";
static char __pyx_k__gt_qual[] = "gt_qual";
static char __pyx_k__gt_type[] = "gt_type";
static char __pyx_k__num_het[] = "num_het";
static char __pyx_k__samples[] = "samples";
static char __pyx_k__unknown[] = "unknown";
static char __pyx_k__GzipFile[] = "GzipFile";
static char __pyx_k__KeyError[] = "KeyError";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__endswith[] = "endswith";
static char __pyx_k__filename[] = "filename";
static char __pyx_k__gt_bases[] = "gt_bases";
static char __pyx_k__gt_depth[] = "gt_depth";
static char __pyx_k__gt_quals[] = "gt_quals";
static char __pyx_k__gt_types[] = "gt_types";
static char __pyx_k__is_indel[] = "is_indel";
static char __pyx_k__iterable[] = "iterable";
static char __pyx_k__metadata[] = "metadata";
static char __pyx_k__property[] = "property";
static char __pyx_k__samp_fmt[] = "samp_fmt";
static char __pyx_k__template[] = "template";
static char __pyx_k__var_type[] = "var_type";
static char __pyx_k__writerow[] = "writerow";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__IMPRECISE[] = "IMPRECISE";
static char __pyx_k__Tabixfile[] = "Tabixfile";
static char __pyx_k__VALIDATED[] = "VALIDATED";
static char __pyx_k__VCFReader[] = "VCFReader";
static char __pyx_k__VCFWriter[] = "VCFWriter";
static char __pyx_k__call_rate[] = "call_rate";
static char __pyx_k__delimiter[] = "delimiter";
static char __pyx_k__enumerate[] = "enumerate";
static char __pyx_k__gt_depths[] = "gt_depths";
static char __pyx_k__gt_phases[] = "gt_phases";
static char __pyx_k__itertools[] = "itertools";
static char __pyx_k__read_info[] = "read_info";
static char __pyx_k__read_meta[] = "read_meta";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__SampleInfo[] = "SampleInfo";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k___stringify[] = "_stringify";
static char __pyx_k__compressed[] = "compressed";
static char __pyx_k__is_variant[] = "is_variant";
static char __pyx_k__namedtuple[] = "namedtuple";
static char __pyx_k__num_called[] = "num_called";
static char __pyx_k__samp_fmt_s[] = "samp_fmt_s";
static char __pyx_k__startswith[] = "startswith";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k__SyntaxError[] = "SyntaxError";
static char __pyx_k___SampleInfo[] = "_SampleInfo";
static char __pyx_k___format_alt[] = "_format_alt";
static char __pyx_k___parse_info[] = "_parse_info";
static char __pyx_k__collections[] = "collections";
static char __pyx_k__info_string[] = "info_string";
static char __pyx_k__is_deletion[] = "is_deletion";
static char __pyx_k__meta_string[] = "meta_string";
static char __pyx_k__num_hom_alt[] = "num_hom_alt";
static char __pyx_k__num_hom_ref[] = "num_hom_ref";
static char __pyx_k__num_unknown[] = "num_unknown";
static char __pyx_k__prepend_chr[] = "prepend_chr";
static char __pyx_k__read_filter[] = "read_filter";
static char __pyx_k__read_format[] = "read_format";
static char __pyx_k__var_subtype[] = "var_subtype";
static char __pyx_k___format_info[] = "_format_info";
static char __pyx_k___format_qual[] = "_format_qual";
static char __pyx_k__fixed_fields[] = "fixed_fields";
static char __pyx_k__gt_alt_depth[] = "gt_alt_depth";
static char __pyx_k__gt_ref_depth[] = "gt_ref_depth";
static char __pyx_k__info_pattern[] = "info_pattern";
static char __pyx_k__meta_pattern[] = "meta_pattern";
static char __pyx_k__write_record[] = "write_record";
static char __pyx_k__RESERVED_INFO[] = "RESERVED_INFO";
static char __pyx_k__StopIteration[] = "StopIteration";
static char __pyx_k___parse_sample[] = "_parse_sample";
static char __pyx_k___write_header[] = "_write_header";
static char __pyx_k__filter_string[] = "filter_string";
static char __pyx_k__format_string[] = "format_string";
static char __pyx_k__gt_alt_depths[] = "gt_alt_depths";
static char __pyx_k__gt_ref_depths[] = "gt_ref_depths";
static char __pyx_k__is_sv_precise[] = "is_sv_precise";
static char __pyx_k__is_transition[] = "is_transition";
static char __pyx_k__samp_fmt_nums[] = "samp_fmt_nums";
static char __pyx_k___format_sample[] = "_format_sample";
static char __pyx_k___parse_samples[] = "_parse_samples";
static char __pyx_k__filter_pattern[] = "filter_pattern";
static char __pyx_k__format_pattern[] = "format_pattern";
static char __pyx_k__is_monomorphic[] = "is_monomorphic";
static char __pyx_k__nucl_diversity[] = "nucl_diversity";
static char __pyx_k__samp_fmt_types[] = "samp_fmt_types";
static char __pyx_k__sample_indexes[] = "sample_indexes";
static char __pyx_k__RESERVED_FORMAT[] = "RESERVED_FORMAT";
static char __pyx_k____update_readme[] = "__update_readme";
static char __pyx_k___parse_metainfo[] = "_parse_metainfo";
static PyObject *__pyx_n_s_1;
static PyObject *__pyx_kp_s_111;
static PyObject *__pyx_kp_s_115;
static PyObject *__pyx_n_s_116;
static PyObject *__pyx_n_s_117;
static PyObject *__pyx_n_s_120;
static PyObject *__pyx_n_s_123;
static PyObject *__pyx_n_s_126;
static PyObject *__pyx_n_s_129;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_130;
static PyObject *__pyx_kp_s_131;
static PyObject *__pyx_n_s_134;
static PyObject *__pyx_n_s_137;
static PyObject *__pyx_n_s_140;
static PyObject *__pyx_n_s_143;
static PyObject *__pyx_n_s_146;
static PyObject *__pyx_n_s_149;
static PyObject *__pyx_n_s_153;
static PyObject *__pyx_n_s_157;
static PyObject *__pyx_kp_s_158;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_kp_s_27;
static PyObject *__pyx_kp_b_28;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_30;
static PyObject *__pyx_kp_s_32;
static PyObject *__pyx_kp_b_33;
static PyObject *__pyx_kp_s_33;
static PyObject *__pyx_kp_s_34;
static PyObject *__pyx_kp_s_35;
static PyObject *__pyx_kp_s_36;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_kp_s_39;
static PyObject *__pyx_kp_s_4;
static PyObject *__pyx_kp_s_41;
static PyObject *__pyx_kp_s_43;
static PyObject *__pyx_kp_s_45;
static PyObject *__pyx_kp_s_47;
static PyObject *__pyx_kp_s_49;
static PyObject *__pyx_kp_s_5;
static PyObject *__pyx_kp_s_51;
static PyObject *__pyx_kp_s_53;
static PyObject *__pyx_kp_s_55;
static PyObject *__pyx_kp_s_57;
static PyObject *__pyx_kp_s_59;
static PyObject *__pyx_kp_s_62;
static PyObject *__pyx_kp_s_7;
static PyObject *__pyx_kp_s_75;
static PyObject *__pyx_kp_s_77;
static PyObject *__pyx_kp_s_79;
static PyObject *__pyx_kp_s_80;
static PyObject *__pyx_kp_s_81;
static PyObject *__pyx_kp_s_82;
static PyObject *__pyx_kp_s_84;
static PyObject *__pyx_kp_s__0;
static PyObject *__pyx_n_b__A;
static PyObject *__pyx_n_s__A;
static PyObject *__pyx_n_s__AA;
static PyObject *__pyx_n_s__AC;
static PyObject *__pyx_n_s__AD;
static PyObject *__pyx_n_s__AF;
static PyObject *__pyx_n_s__ALT;
static PyObject *__pyx_n_s__AN;
static PyObject *__pyx_n_s__AO;
static PyObject *__pyx_n_s__BND;
static PyObject *__pyx_n_s__BQ;
static PyObject *__pyx_n_b__C;
static PyObject *__pyx_n_s__C;
static PyObject *__pyx_n_s__CHROM;
static PyObject *__pyx_n_s__CIGAR;
static PyObject *__pyx_n_s__DB;
static PyObject *__pyx_n_s__DP;
static PyObject *__pyx_n_s__END;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__FILTER;
static PyObject *__pyx_n_s__FORMAT;
static PyObject *__pyx_n_s__FT;
static PyObject *__pyx_n_s__Filter;
static PyObject *__pyx_n_b__Flag;
static PyObject *__pyx_n_s__Flag;
static PyObject *__pyx_n_b__Float;
static PyObject *__pyx_n_s__Float;
static PyObject *__pyx_n_s__Format;
static PyObject *__pyx_n_b__G;
static PyObject *__pyx_n_s__G;
static PyObject *__pyx_n_s__GL;
static PyObject *__pyx_n_s__GQ;
static PyObject *__pyx_n_s__GT;
static PyObject *__pyx_n_s__GzipFile;
static PyObject *__pyx_n_s__H2;
static PyObject *__pyx_n_s__HET;
static PyObject *__pyx_n_s__HOM_ALT;
static PyObject *__pyx_n_s__HOM_REF;
static PyObject *__pyx_n_s__HQ;
static PyObject *__pyx_n_s__ID;
static PyObject *__pyx_n_s__IMPRECISE;
static PyObject *__pyx_n_s__INFO;
static PyObject *__pyx_n_s__ImportError;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_s__Info;
static PyObject *__pyx_n_b__Integer;
static PyObject *__pyx_n_s__Integer;
static PyObject *__pyx_n_s__KeyError;
static PyObject *__pyx_n_s__MQ;
static PyObject *__pyx_n_s__MQ0;
static PyObject *__pyx_n_s__NS;
static PyObject *__pyx_n_s__Numeric;
static PyObject *__pyx_n_b__PASS;
static PyObject *__pyx_n_s__POS;
static PyObject *__pyx_n_s__QUAL;
static PyObject *__pyx_n_s__REF;
static PyObject *__pyx_n_s__RESERVED_FORMAT;
static PyObject *__pyx_n_s__RESERVED_INFO;
static PyObject *__pyx_n_s__RO;
static PyObject *__pyx_n_s__SB;
static PyObject *__pyx_n_s__SOMATIC;
static PyObject *__pyx_n_s__SVTYPE;
static PyObject *__pyx_n_s__SampleInfo;
static PyObject *__pyx_n_s__StopIteration;
static PyObject *__pyx_n_b__String;
static PyObject *__pyx_n_s__String;
static PyObject *__pyx_n_s__SyntaxError;
static PyObject *__pyx_n_b__T;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__Tabixfile;
static PyObject *__pyx_n_s__UNKNOWN;
static PyObject *__pyx_n_s__VALIDATED;
static PyObject *__pyx_n_s__VCFReader;
static PyObject *__pyx_n_s__VCFWriter;
static PyObject *__pyx_n_s__VERBOSE;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s__Writer;
static PyObject *__pyx_n_s___Filter;
static PyObject *__pyx_n_s___Format;
static PyObject *__pyx_n_s___Info;
static PyObject *__pyx_n_s___SampleInfo;
static PyObject *__pyx_n_s____doc__;
static PyObject *__pyx_n_s____init__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s____update_readme;
static PyObject *__pyx_n_s___format_alt;
static PyObject *__pyx_n_s___format_info;
static PyObject *__pyx_n_s___format_qual;
static PyObject *__pyx_n_s___format_sample;
static PyObject *__pyx_n_s___map;
static PyObject *__pyx_n_s___parse_info;
static PyObject *__pyx_n_s___parse_metainfo;
static PyObject *__pyx_n_s___parse_sample;
static PyObject *__pyx_n_s___parse_samples;
static PyObject *__pyx_n_s___stringify;
static PyObject *__pyx_n_s___write_header;
static PyObject *__pyx_n_s__aaf;
static PyObject *__pyx_n_s__alt;
static PyObject *__pyx_n_s__bad;
static PyObject *__pyx_n_s__call_rate;
static PyObject *__pyx_n_s__chr;
static PyObject *__pyx_n_s__chrom;
static PyObject *__pyx_n_s__cmp;
static PyObject *__pyx_n_s__collections;
static PyObject *__pyx_n_s__compile;
static PyObject *__pyx_n_s__complex;
static PyObject *__pyx_n_s__compressed;
static PyObject *__pyx_n_s__csv;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__del;
static PyObject *__pyx_n_s__delimiter;
static PyObject *__pyx_n_s__desc;
static PyObject *__pyx_n_s__end;
static PyObject *__pyx_n_s__endswith;
static PyObject *__pyx_n_s__enumerate;
static PyObject *__pyx_n_s__exit;
static PyObject *__pyx_n_s__extend;
static PyObject *__pyx_n_s__fetch;
static PyObject *__pyx_n_s__ffs;
static PyObject *__pyx_n_s__file;
static PyObject *__pyx_n_s__filename;
static PyObject *__pyx_n_s__fileobj;
static PyObject *__pyx_n_s__filt;
static PyObject *__pyx_n_s__filter_pattern;
static PyObject *__pyx_n_s__filter_string;
static PyObject *__pyx_n_s__filters;
static PyObject *__pyx_n_s__find;
static PyObject *__pyx_n_s__fixed_fields;
static PyObject *__pyx_n_s__fmt;
static PyObject *__pyx_n_s__form;
static PyObject *__pyx_n_s__format_pattern;
static PyObject *__pyx_n_s__format_string;
static PyObject *__pyx_n_s__formats;
static PyObject *__pyx_n_s__fsock;
static PyObject *__pyx_n_s__func;
static PyObject *__pyx_n_s__genexpr;
static PyObject *__pyx_n_s__group;
static PyObject *__pyx_n_s__gt_alt_depth;
static PyObject *__pyx_n_s__gt_alt_depths;
static PyObject *__pyx_n_s__gt_bases;
static PyObject *__pyx_n_s__gt_depth;
static PyObject *__pyx_n_s__gt_depths;
static PyObject *__pyx_n_s__gt_phases;
static PyObject *__pyx_n_s__gt_qual;
static PyObject *__pyx_n_s__gt_quals;
static PyObject *__pyx_n_s__gt_ref_depth;
static PyObject *__pyx_n_s__gt_ref_depths;
static PyObject *__pyx_n_s__gt_type;
static PyObject *__pyx_n_s__gt_types;
static PyObject *__pyx_n_s__gzip;
static PyObject *__pyx_n_s__id;
static PyObject *__pyx_n_s__indel;
static PyObject *__pyx_n_s__info;
static PyObject *__pyx_n_s__info_pattern;
static PyObject *__pyx_n_s__info_string;
static PyObject *__pyx_n_s__infos;
static PyObject *__pyx_n_s__ins;
static PyObject *__pyx_n_s__is_deletion;
static PyObject *__pyx_n_s__is_het;
static PyObject *__pyx_n_s__is_indel;
static PyObject *__pyx_n_s__is_monomorphic;
static PyObject *__pyx_n_s__is_snp;
static PyObject *__pyx_n_s__is_sv;
static PyObject *__pyx_n_s__is_sv_precise;
static PyObject *__pyx_n_s__is_transition;
static PyObject *__pyx_n_s__is_variant;
static PyObject *__pyx_n_s__items;
static PyObject *__pyx_n_s__iterable;
static PyObject *__pyx_n_s__itertools;
static PyObject *__pyx_n_s__izip;
static PyObject *__pyx_n_s__join;
static PyObject *__pyx_n_s__key;
static PyObject *__pyx_n_s__line;
static PyObject *__pyx_n_s__match;
static PyObject *__pyx_n_s__meta_pattern;
static PyObject *__pyx_n_s__meta_string;
static PyObject *__pyx_n_s__metadata;
static PyObject *__pyx_n_s__name;
static PyObject *__pyx_n_s__namedtuple;
static PyObject *__pyx_n_s__next;
static PyObject *__pyx_n_s__none;
static PyObject *__pyx_n_s__nucl_diversity;
static PyObject *__pyx_n_s__num;
static PyObject *__pyx_n_s__num_called;
static PyObject *__pyx_n_s__num_het;
static PyObject *__pyx_n_s__num_hom_alt;
static PyObject *__pyx_n_s__num_hom_ref;
static PyObject *__pyx_n_s__num_unknown;
static PyObject *__pyx_n_s__number;
static PyObject *__pyx_n_s__object;
static PyObject *__pyx_n_s__prepend_chr;
static PyObject *__pyx_n_s__property;
static PyObject *__pyx_n_s__pysam;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__re;
static PyObject *__pyx_n_s__read_filter;
static PyObject *__pyx_n_s__read_format;
static PyObject *__pyx_n_s__read_info;
static PyObject *__pyx_n_s__read_meta;
static PyObject *__pyx_n_s__record;
static PyObject *__pyx_n_s__rstrip;
static PyObject *__pyx_n_s__samp_fmt;
static PyObject *__pyx_n_s__samp_fmt_nums;
static PyObject *__pyx_n_s__samp_fmt_s;
static PyObject *__pyx_n_s__samp_fmt_types;
static PyObject *__pyx_n_s__sample;
static PyObject *__pyx_n_s__sample_indexes;
static PyObject *__pyx_n_s__samples;
static PyObject *__pyx_n_s__seek;
static PyObject *__pyx_n_s__self;
static PyObject *__pyx_n_s__site;
static PyObject *__pyx_n_s__snp;
static PyObject *__pyx_n_s__split;
static PyObject *__pyx_n_s__start;
static PyObject *__pyx_n_s__startswith;
static PyObject *__pyx_n_s__stderr;
static PyObject *__pyx_n_s__stream;
static PyObject *__pyx_n_s__strip;
static PyObject *__pyx_n_s__super;
static PyObject *__pyx_n_s__sv;
static PyObject *__pyx_n_s__sv_end;
static PyObject *__pyx_n_s__sys;
static PyObject *__pyx_n_s__tell;
static PyObject *__pyx_n_s__template;
static PyObject *__pyx_n_s__ts;
static PyObject *__pyx_n_s__tv;
static PyObject *__pyx_n_s__type;
static PyObject *__pyx_n_s__unknown;
static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__var_subtype;
static PyObject *__pyx_n_s__var_type;
static PyObject *__pyx_n_s__vcf;
static PyObject *__pyx_n_s__w;
static PyObject *__pyx_n_s__write;
static PyObject *__pyx_n_s__write_record;
static PyObject *__pyx_n_s__writer;
static PyObject *__pyx_n_s__writerow;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__xrange;
static PyObject *__pyx_n_s__y;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k_40;
static PyObject *__pyx_k_tuple_6;
static PyObject *__pyx_k_tuple_8;
static PyObject *__pyx_k_tuple_9;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_11;
static PyObject *__pyx_k_tuple_12;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_tuple_16;
static PyObject *__pyx_k_tuple_18;
static PyObject *__pyx_k_tuple_19;
static PyObject *__pyx_k_tuple_20;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_24;
static PyObject *__pyx_k_tuple_26;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_37;
static PyObject *__pyx_k_tuple_42;
static PyObject *__pyx_k_tuple_44;
static PyObject *__pyx_k_tuple_46;
static PyObject *__pyx_k_tuple_48;
static PyObject *__pyx_k_tuple_50;
static PyObject *__pyx_k_tuple_52;
static PyObject *__pyx_k_tuple_54;
static PyObject *__pyx_k_tuple_56;
static PyObject *__pyx_k_tuple_58;
static PyObject *__pyx_k_tuple_60;
static PyObject *__pyx_k_tuple_61;
static PyObject *__pyx_k_tuple_63;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_65;
static PyObject *__pyx_k_tuple_66;
static PyObject *__pyx_k_tuple_67;
static PyObject *__pyx_k_tuple_68;
static PyObject *__pyx_k_tuple_69;
static PyObject *__pyx_k_tuple_70;
static PyObject *__pyx_k_tuple_71;
static PyObject *__pyx_k_tuple_72;
static PyObject *__pyx_k_tuple_73;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_78;
static PyObject *__pyx_k_tuple_83;
static PyObject *__pyx_k_tuple_85;
static PyObject *__pyx_k_tuple_112;
static PyObject *__pyx_k_tuple_113;
static PyObject *__pyx_k_tuple_118;
static PyObject *__pyx_k_tuple_121;
static PyObject *__pyx_k_tuple_124;
static PyObject *__pyx_k_tuple_127;
static PyObject *__pyx_k_tuple_132;
static PyObject *__pyx_k_tuple_135;
static PyObject *__pyx_k_tuple_138;
static PyObject *__pyx_k_tuple_141;
static PyObject *__pyx_k_tuple_144;
static PyObject *__pyx_k_tuple_147;
static PyObject *__pyx_k_tuple_150;
static PyObject *__pyx_k_tuple_152;
static PyObject *__pyx_k_tuple_154;
static PyObject *__pyx_k_tuple_156;
static PyObject *__pyx_k_tuple_159;
static PyObject *__pyx_k_codeobj_114;
static PyObject *__pyx_k_codeobj_119;
static PyObject *__pyx_k_codeobj_122;
static PyObject *__pyx_k_codeobj_125;
static PyObject *__pyx_k_codeobj_128;
static PyObject *__pyx_k_codeobj_133;
static PyObject *__pyx_k_codeobj_136;
static PyObject *__pyx_k_codeobj_139;
static PyObject *__pyx_k_codeobj_142;
static PyObject *__pyx_k_codeobj_145;
static PyObject *__pyx_k_codeobj_148;
static PyObject *__pyx_k_codeobj_151;
static PyObject *__pyx_k_codeobj_155;
static PyObject *__pyx_k_codeobj_160;

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_1__init__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser___init__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":46
 * class _vcf_metadata_parser(object):
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         super(_vcf_metadata_parser, self).__init__()
 *         self.info_pattern = re.compile(r'''\#\#INFO=<
 */

static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cyvcf/parser.pyx":47
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):
 *         super(_vcf_metadata_parser, self).__init__()             # <<<<<<<<<<<<<<
 *         self.info_pattern = re.compile(r'''\#\#INFO=<
 *             ID=(?P<id>[^,]+),
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":48
 *     def __init__(self):
 *         super(_vcf_metadata_parser, self).__init__()
 *         self.info_pattern = re.compile(r'''\#\#INFO=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Number=(?P<number>-?\d+|\.|[AG]),
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":53
 *             Type=(?P<type>Integer|Float|Flag|Character|String),
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.filter_pattern = re.compile(r'''\#\#FILTER=<
 *             ID=(?P<id>[^,]+),
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__VERBOSE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":48
 *     def __init__(self):
 *         super(_vcf_metadata_parser, self).__init__()
 *         self.info_pattern = re.compile(r'''\#\#INFO=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Number=(?P<number>-?\d+|\.|[AG]),
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__info_pattern, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":54
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.filter_pattern = re.compile(r'''\#\#FILTER=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":57
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.format_pattern = re.compile(r'''\#\#FORMAT=<
 *             ID=(?P<id>.+),
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__VERBOSE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":54
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.filter_pattern = re.compile(r'''\#\#FILTER=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__filter_pattern, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":58
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.format_pattern = re.compile(r'''\#\#FORMAT=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>.+),
 *             Number=(?P<number>-?\d+|\.|[AG]),
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":63
 *             Type=(?P<type>.+),
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__VERBOSE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":58
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.format_pattern = re.compile(r'''\#\#FORMAT=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>.+),
 *             Number=(?P<number>-?\d+|\.|[AG]),
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__format_pattern, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":64
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')             # <<<<<<<<<<<<<<
 * 
 *     def read_info(self, info_string):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__meta_pattern, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_3read_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_20_vcf_metadata_parser_2read_info[] = "Read a meta-information INFO line.";
static PyMethodDef __pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_3read_info = {__Pyx_NAMESTR("read_info"), (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_3read_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_20_vcf_metadata_parser_2read_info)};
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_3read_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_info_string = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__info_string,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info_string)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_info", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_info_string = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_info", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_2read_info(__pyx_self, __pyx_v_self, __pyx_v_info_string);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":66
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')
 * 
 *     def read_info(self, info_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information INFO line.'''
 *         match = self.info_pattern.match(info_string)
 */

static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_2read_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info_string) {
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_v_info = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_info", 0);

  /* "cyvcf/parser.pyx":68
 *     def read_info(self, info_string):
 *         '''Read a meta-information INFO line.'''
 *         match = self.info_pattern.match(info_string)             # <<<<<<<<<<<<<<
 *         if not match:
 *             raise SyntaxError(
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__info_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_info_string);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_info_string);
  __Pyx_GIVEREF(__pyx_v_info_string);
  __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 = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":69
 *         '''Read a meta-information INFO line.'''
 *         match = self.info_pattern.match(info_string)
 *         if not match:             # <<<<<<<<<<<<<<
 *             raise SyntaxError(
 *                 "One of the INFO lines is malformed: %s" % info_string)
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":71
 *         if not match:
 *             raise SyntaxError(
 *                 "One of the INFO lines is malformed: %s" % info_string)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_v_info_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_SyntaxError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":73
 *                 "One of the INFO lines is malformed: %s" % info_string)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             num = int(match.group('number'))
 *             if num < 0:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "cyvcf/parser.pyx":74
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_v_num = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "cyvcf/parser.pyx":75
 *         try:
 *             num = int(match.group('number'))
 *             if num < 0:             # <<<<<<<<<<<<<<
 *                 num = None
 *         except ValueError:
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_num, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "cyvcf/parser.pyx":76
 *             num = int(match.group('number'))
 *             if num < 0:
 *                 num = None             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             num = None
 */
        __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_v_num);
        __pyx_v_num = Py_None;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L11_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":77
 *             if num < 0:
 *                 num = None
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             num = None
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);

      /* "cyvcf/parser.pyx":78
 *                 num = None
 *         except ValueError:
 *             num = None             # <<<<<<<<<<<<<<
 * 
 *         info = _Info(match.group('id'), num,
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF(__pyx_v_num);
      __pyx_v_num = Py_None;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5_exception_handled;
    }
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L11_try_end:;
  }

  /* "cyvcf/parser.pyx":80
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___Info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":81
 * 
 *         info = _Info(match.group('id'), num,
 *                      match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), info)
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_num);
  __Pyx_GIVEREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_1 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_info = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":83
 *                      match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), info)             # <<<<<<<<<<<<<<
 * 
 *     def read_filter(self, filter_string):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_info);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_info);
  __Pyx_GIVEREF(__pyx_v_info);
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_20_vcf_metadata_parser_4read_filter[] = "Read a meta-information FILTER line.";
static PyMethodDef __pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter = {__Pyx_NAMESTR("read_filter"), (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_20_vcf_metadata_parser_4read_filter)};
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filter_string = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_filter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filter_string,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter_string)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_filter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_filter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_filter_string = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_filter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_4read_filter(__pyx_self, __pyx_v_self, __pyx_v_filter_string);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":85
 *         return (match.group('id'), info)
 * 
 *     def read_filter(self, filter_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information FILTER line.'''
 *         match = self.filter_pattern.match(filter_string)
 */

static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_4read_filter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter_string) {
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_v_filt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_filter", 0);

  /* "cyvcf/parser.pyx":87
 *     def read_filter(self, filter_string):
 *         '''Read a meta-information FILTER line.'''
 *         match = self.filter_pattern.match(filter_string)             # <<<<<<<<<<<<<<
 *         if not match:
 *             raise SyntaxError(
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__filter_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filter_string);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filter_string);
  __Pyx_GIVEREF(__pyx_v_filter_string);
  __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 = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":88
 *         '''Read a meta-information FILTER line.'''
 *         match = self.filter_pattern.match(filter_string)
 *         if not match:             # <<<<<<<<<<<<<<
 *             raise SyntaxError(
 *                 "One of the FILTER lines is malformed: %s" % filter_string)
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":90
 *         if not match:
 *             raise SyntaxError(
 *                 "One of the FILTER lines is malformed: %s" % filter_string)             # <<<<<<<<<<<<<<
 * 
 *         filt = _Filter(match.group('id'), match.group('desc'))
 */
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_v_filter_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_SyntaxError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":92
 *                 "One of the FILTER lines is malformed: %s" % filter_string)
 * 
 *         filt = _Filter(match.group('id'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), filt)
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___Filter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_filt = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cyvcf/parser.pyx":94
 *         filt = _Filter(match.group('id'), match.group('desc'))
 * 
 *         return (match.group('id'), filt)             # <<<<<<<<<<<<<<
 * 
 *     def read_format(self, format_string):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filt);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_filt);
  __Pyx_GIVEREF(__pyx_v_filt);
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XDECREF(__pyx_v_filt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_7read_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_20_vcf_metadata_parser_6read_format[] = "Read a meta-information FORMAT line.";
static PyMethodDef __pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_7read_format = {__Pyx_NAMESTR("read_format"), (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_7read_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_20_vcf_metadata_parser_6read_format)};
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_7read_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_format_string = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_format (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format_string,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format_string)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_format", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_format_string = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_format", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_6read_format(__pyx_self, __pyx_v_self, __pyx_v_format_string);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":96
 *         return (match.group('id'), filt)
 * 
 *     def read_format(self, format_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information FORMAT line.'''
 *         match = self.format_pattern.match(format_string)
 */

static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_6read_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format_string) {
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_v_form = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_format", 0);

  /* "cyvcf/parser.pyx":98
 *     def read_format(self, format_string):
 *         '''Read a meta-information FORMAT line.'''
 *         match = self.format_pattern.match(format_string)             # <<<<<<<<<<<<<<
 *         if not match:
 *             raise SyntaxError(
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_format_string);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_format_string);
  __Pyx_GIVEREF(__pyx_v_format_string);
  __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 = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":99
 *         '''Read a meta-information FORMAT line.'''
 *         match = self.format_pattern.match(format_string)
 *         if not match:             # <<<<<<<<<<<<<<
 *             raise SyntaxError(
 *                 "One of the FORMAT lines is malformed: %s" % format_string)
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":101
 *         if not match:
 *             raise SyntaxError(
 *                 "One of the FORMAT lines is malformed: %s" % format_string)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_format_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_SyntaxError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":103
 *                 "One of the FORMAT lines is malformed: %s" % format_string)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             num = int(match.group('number'))
 *             if num < 0:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "cyvcf/parser.pyx":104
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_v_num = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "cyvcf/parser.pyx":105
 *         try:
 *             num = int(match.group('number'))
 *             if num < 0:             # <<<<<<<<<<<<<<
 *                 num = None
 *         except ValueError:
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_num, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "cyvcf/parser.pyx":106
 *             num = int(match.group('number'))
 *             if num < 0:
 *                 num = None             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             num = None
 */
        __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_v_num);
        __pyx_v_num = Py_None;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L11_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":107
 *             if num < 0:
 *                 num = None
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             num = None
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);

      /* "cyvcf/parser.pyx":108
 *                 num = None
 *         except ValueError:
 *             num = None             # <<<<<<<<<<<<<<
 * 
 *         form = _Format(match.group('id'), num,
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF(__pyx_v_num);
      __pyx_v_num = Py_None;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5_exception_handled;
    }
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L11_try_end:;
  }

  /* "cyvcf/parser.pyx":110
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___Format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":111
 * 
 *         form = _Format(match.group('id'), num,
 *                        match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), form)
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_num);
  __Pyx_GIVEREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_1 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_form = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":113
 *                        match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), form)             # <<<<<<<<<<<<<<
 * 
 *     def read_meta(self, meta_string):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_form);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_form);
  __Pyx_GIVEREF(__pyx_v_form);
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XDECREF(__pyx_v_form);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta = {__Pyx_NAMESTR("read_meta"), (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_meta_string = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_meta (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__meta_string,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__meta_string)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_meta", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_meta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_meta_string = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_meta", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_meta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_8read_meta(__pyx_self, __pyx_v_self, __pyx_v_meta_string);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":115
 *         return (match.group('id'), form)
 * 
 *     def read_meta(self, meta_string):             # <<<<<<<<<<<<<<
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')
 */

static PyObject *__pyx_pf_5cyvcf_6parser_20_vcf_metadata_parser_8read_meta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_meta_string) {
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_meta", 0);

  /* "cyvcf/parser.pyx":116
 * 
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)             # <<<<<<<<<<<<<<
 *         return match.group('key'), match.group('val')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__meta_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_meta_string);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_meta_string);
  __Pyx_GIVEREF(__pyx_v_meta_string);
  __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 = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":117
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser._vcf_metadata_parser.read_meta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_site = 0;
  char *__pyx_v_sample;
  PyObject *__pyx_v_data = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__site,&__pyx_n_s__sample,&__pyx_n_s__data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__site)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sample)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_site = ((struct __pyx_obj_5cyvcf_6parser__Record *)values[0]);
    __pyx_v_sample = PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_sample) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_data = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._Call.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_site), __pyx_ptype_5cyvcf_6parser__Record, 1, "site", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyDict_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call___cinit__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), __pyx_v_site, __pyx_v_sample, __pyx_v_data);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":131
 *     cdef bint called, phased
 * 
 *     def __cinit__(self, _Record site, char *sample, dict data):             # <<<<<<<<<<<<<<
 *         #: The ``_Record`` for this ``_Call``
 *         self.site = site
 */

static int __pyx_pf_5cyvcf_6parser_5_Call___cinit__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_site, char *__pyx_v_sample, PyObject *__pyx_v_data) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cyvcf/parser.pyx":133
 *     def __cinit__(self, _Record site, char *sample, dict data):
 *         #: The ``_Record`` for this ``_Call``
 *         self.site = site             # <<<<<<<<<<<<<<
 *         #: The sample name
 *         self.sample = sample
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_site));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_site));
  __Pyx_GOTREF(__pyx_v_self->site);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->site));
  __pyx_v_self->site = __pyx_v_site;

  /* "cyvcf/parser.pyx":135
 *         self.site = site
 *         #: The sample name
 *         self.sample = sample             # <<<<<<<<<<<<<<
 *         #: Dictionary of data from the VCF file
 *         self.data = data
 */
  __pyx_t_1 = PyBytes_FromString(__pyx_v_sample); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->sample);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->sample));
  __pyx_v_self->sample = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":137
 *         self.sample = sample
 *         #: Dictionary of data from the VCF file
 *         self.data = data             # <<<<<<<<<<<<<<
 *         # '0/1', '0/0', etc.
 *         self.gt_nums = self.data['GT']
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_data));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
  __Pyx_GOTREF(__pyx_v_self->data);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->data));
  __pyx_v_self->data = __pyx_v_data;

  /* "cyvcf/parser.pyx":139
 *         self.data = data
 *         # '0/1', '0/0', etc.
 *         self.gt_nums = self.data['GT']             # <<<<<<<<<<<<<<
 *         # True if the GT is not ./.
 *         self.called = self.gt_nums is not None
 */
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_nums);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_nums));
  __pyx_v_self->gt_nums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":141
 *         self.gt_nums = self.data['GT']
 *         # True if the GT is not ./.
 *         self.called = self.gt_nums is not None             # <<<<<<<<<<<<<<
 *         # True if the GT is phased (A|G, not A/G)
 *         if self.gt_nums is not None and self.data['GT'].find('|') >= 0:
 */
  __pyx_t_2 = (__pyx_v_self->gt_nums != ((PyObject*)Py_None));
  __pyx_v_self->called = __pyx_t_2;

  /* "cyvcf/parser.pyx":143
 *         self.called = self.gt_nums is not None
 *         # True if the GT is phased (A|G, not A/G)
 *         if self.gt_nums is not None and self.data['GT'].find('|') >= 0:             # <<<<<<<<<<<<<<
 *             self.phased = 1
 *         else:
 */
  __pyx_t_2 = (__pyx_v_self->gt_nums != ((PyObject*)Py_None));
  if (__pyx_t_2) {
    if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__find); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":144
 *         # True if the GT is phased (A|G, not A/G)
 *         if self.gt_nums is not None and self.data['GT'].find('|') >= 0:
 *             self.phased = 1             # <<<<<<<<<<<<<<
 *         else:
 *             self.phased = 0
 */
    __pyx_v_self->phased = 1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":146
 *             self.phased = 1
 *         else:
 *             self.phased = 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    __pyx_v_self->phased = 0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser._Call.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_2__repr__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":148
 *             self.phased = 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "Call(sample=%s, GT=%s, GQ=%s)" % (self.sample, self.gt_nums, self.data.get('GQ', ''))
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_2__repr__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cyvcf/parser.pyx":149
 * 
 *     def __repr__(self):
 *         return "Call(sample=%s, GT=%s, GQ=%s)" % (self.sample, self.gt_nums, self.data.get('GQ', ''))             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_kp_s_28)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->sample));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->sample));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->sample));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_nums));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->gt_nums));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->gt_nums));
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_27), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Call.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":151
 *         return "Call(sample=%s, GT=%s, GQ=%s)" % (self.sample, self.gt_nums, self.data.get('GQ', ''))
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         """ Two _Calls are equal if their _Records are equal
 *             and the samples and ``gt_type``s are the same
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "cyvcf/parser.pyx":156
 *         """
 *         # < 0 | <= 1 | == 2 | != 3 |  > 4 | >= 5
 *         if op == 2: # 2             # <<<<<<<<<<<<<<
 *             return (self.site == other.site
 *                     and self.sample == other.sample
 */
  __pyx_t_1 = (__pyx_v_op == 2);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":157
 *         # < 0 | <= 1 | == 2 | != 3 |  > 4 | >= 5
 *         if op == 2: # 2
 *             return (self.site == other.site             # <<<<<<<<<<<<<<
 *                     and self.sample == other.sample
 *                     and self.gt_type == other.gt_type)
 */
    __Pyx_XDECREF(__pyx_r);

    /* "cyvcf/parser.pyx":158
 *         if op == 2: # 2
 *             return (self.site == other.site
 *                     and self.sample == other.sample             # <<<<<<<<<<<<<<
 *                     and self.gt_type == other.gt_type)
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__site); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);

    /* "cyvcf/parser.pyx":157
 *         # < 0 | <= 1 | == 2 | != 3 |  > 4 | >= 5
 *         if op == 2: # 2
 *             return (self.site == other.site             # <<<<<<<<<<<<<<
 *                     and self.sample == other.sample
 *                     and self.gt_type == other.gt_type)
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__site); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":158
 *         if op == 2: # 2
 *             return (self.site == other.site
 *                     and self.sample == other.sample             # <<<<<<<<<<<<<<
 *                     and self.gt_type == other.gt_type)
 * 
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__sample); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__sample); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cyvcf/parser.pyx":159
 *             return (self.site == other.site
 *                     and self.sample == other.sample
 *                     and self.gt_type == other.gt_type)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
      } else {
        __pyx_t_3 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_t_5 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cyvcf.parser._Call.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_6__getitem__[] = " Lookup value, backwards compatibility ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5cyvcf_6parser_5_Call_6__getitem__;
#endif
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6__getitem__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), ((PyObject *)__pyx_v_key));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":161
 *                     and self.gt_type == other.gt_type)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """ Lookup value, backwards compatibility """
 *         return self.data[key]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6__getitem__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cyvcf/parser.pyx":163
 *     def __getitem__(self, key):
 *         """ Lookup value, backwards compatibility """
 *         return self.data[key]             # <<<<<<<<<<<<<<
 * 
 *     property site:
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Call.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_4site_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_4site_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4site___get__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":167
 *     property site:
 *         """Return the VCF _Record to which this _Call belongs"""
 *         def __get__(self): return self.site             # <<<<<<<<<<<<<<
 * 
 *     property sample:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4site___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->site));
  __pyx_r = ((PyObject *)__pyx_v_self->site);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_6sample_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_6sample_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6sample___get__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":171
 *     property sample:
 *         """Return the name of the sample"""
 *         def __get__(self): return self.sample             # <<<<<<<<<<<<<<
 * 
 *     property called:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6sample___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->sample));
  __pyx_r = ((PyObject *)__pyx_v_self->sample);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_6called_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_6called_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6called___get__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":174
 * 
 *     property called:
 *         def __get__(self): return self.called             # <<<<<<<<<<<<<<
 * 
 *     property data:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6called___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->called); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Call.called.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_4data_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4data___get__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":177
 * 
 *     property data:
 *         def __get__(self): return self.data             # <<<<<<<<<<<<<<
 * 
 *     property phased:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4data___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->data));
  __pyx_r = ((PyObject *)__pyx_v_self->data);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_6phased_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_6phased_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6phased___get__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":180
 * 
 *     property phased:
 *         def __get__(self): return self.phased             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6phased___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->phased); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Call.phased.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_9gt_bases(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_8gt_bases[] = "The actual genotype alleles.\n           E.g. if VCF genotype is 0/1, return A/G\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_9gt_bases(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_bases (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_8gt_bases(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":183
 * 
 *     @property
 *     def gt_bases(self):             # <<<<<<<<<<<<<<
 *         '''The actual genotype alleles.
 *            E.g. if VCF genotype is 0/1, return A/G
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_8gt_bases(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_phase_char = NULL;
  PyObject *__pyx_v_alleles = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_bases", 0);

  /* "cyvcf/parser.pyx":188
 *         '''
 *         # nothing to do if no genotype call
 *         if self.called:             # <<<<<<<<<<<<<<
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 *             phase_char = '/' if not self.phased else '|'
 */
  if (__pyx_v_self->called) {

    /* "cyvcf/parser.pyx":190
 *         if self.called:
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 *             phase_char = '/' if not self.phased else '|'             # <<<<<<<<<<<<<<
 *             alleles = self.gt_nums.split(phase_char)
 *             # lookup and return the actual DNA alleles
 */
    if ((!__pyx_v_self->phased)) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
      __pyx_t_1 = __pyx_kp_s_29;
    } else {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
      __pyx_t_1 = __pyx_kp_s_25;
    }
    __pyx_v_phase_char = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":191
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 *             phase_char = '/' if not self.phased else '|'
 *             alleles = self.gt_nums.split(phase_char)             # <<<<<<<<<<<<<<
 *             # lookup and return the actual DNA alleles
 *             try:
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->gt_nums), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_phase_char);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_phase_char);
    __Pyx_GIVEREF(__pyx_v_phase_char);
    __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 = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_alleles = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":193
 *             alleles = self.gt_nums.split(phase_char)
 *             # lookup and return the actual DNA alleles
 *             try:             # <<<<<<<<<<<<<<
 *                 return phase_char.join([self.site.alleles[int(a)] for a in alleles])
 *             except KeyError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "cyvcf/parser.pyx":194
 *             # lookup and return the actual DNA alleles
 *             try:
 *                 return phase_char.join([self.site.alleles[int(a)] for a in alleles])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 sys.stderr.write("Allele number not found in list of alleles\n")
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = PyObject_GetAttr(__pyx_v_phase_char, __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (PyList_CheckExact(__pyx_v_alleles) || PyTuple_CheckExact(__pyx_v_alleles)) {
          __pyx_t_1 = __pyx_v_alleles; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alleles); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
        }
        for (;;) {
          if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #endif
          } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #endif
          } else {
            __pyx_t_9 = __pyx_t_8(__pyx_t_1);
            if (unlikely(!__pyx_t_9)) {
              if (PyErr_Occurred()) {
                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_XDECREF(__pyx_v_a);
          __pyx_v_a = __pyx_t_9;
          __pyx_t_9 = 0;
          if (unlikely(((PyObject *)__pyx_v_self->site->alleles) == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          }
          __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_v_a);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_a);
          __Pyx_GIVEREF(__pyx_v_a);
          __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
          __pyx_t_9 = PyObject_GetItem(((PyObject *)__pyx_v_self->site->alleles), __pyx_t_10); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)__pyx_t_2));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L8_try_return;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L11_try_end;
      __pyx_L8_try_return:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L0;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":195
 *             try:
 *                 return phase_char.join([self.site.alleles[int(a)] for a in alleles])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 sys.stderr.write("Allele number not found in list of alleles\n")
 *         else:
 */
      __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_11) {
        __Pyx_AddTraceback("cyvcf.parser._Call.gt_bases", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_3);

        /* "cyvcf/parser.pyx":196
 *                 return phase_char.join([self.site.alleles[int(a)] for a in alleles])
 *             except KeyError:
 *                 sys.stderr.write("Allele number not found in list of alleles\n")             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
        __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__stderr); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__write); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L11_try_end:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":198
 *                 sys.stderr.write("Allele number not found in list of alleles\n")
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_bases", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phase_char);
  __Pyx_XDECREF(__pyx_v_alleles);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_11gt_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_10gt_type[] = "The type of genotype.\n           0 / 00000000 hom ref\n           1 / 00000001 het\n           2 / 00000010 missing\n           3 / 00000011 hom alt\n           hom_ref  = 0\n           het      = 1\n           hom_alt  = 3  (we don;t track _which+ ALT)\n           uncalled = 2\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_11gt_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_type (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_10gt_type(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":201
 * 
 *     @property
 *     def gt_type(self):             # <<<<<<<<<<<<<<
 *         '''The type of genotype.
 *            0 / 00000000 hom ref
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_10gt_type(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_gt_type = NULL;
  PyObject *__pyx_v_phase_char = NULL;
  PyObject *__pyx_v_alleles = NULL;
  PyObject *__pyx_v_a1 = NULL;
  PyObject *__pyx_v_a2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_type", 0);

  /* "cyvcf/parser.pyx":213
 *         '''
 *         # extract the numeric alleles of the gt string
 *         gt_type = None             # <<<<<<<<<<<<<<
 *         if self.called:
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_gt_type = Py_None;

  /* "cyvcf/parser.pyx":214
 *         # extract the numeric alleles of the gt string
 *         gt_type = None
 *         if self.called:             # <<<<<<<<<<<<<<
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 *             phase_char = '/' if not self.phased else '|'
 */
  if (__pyx_v_self->called) {

    /* "cyvcf/parser.pyx":216
 *         if self.called:
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 *             phase_char = '/' if not self.phased else '|'             # <<<<<<<<<<<<<<
 *             alleles = self.gt_nums.split(phase_char)
 * 
 */
    if ((!__pyx_v_self->phased)) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
      __pyx_t_1 = __pyx_kp_s_29;
    } else {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
      __pyx_t_1 = __pyx_kp_s_25;
    }
    __pyx_v_phase_char = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":217
 *             # grab the numeric alleles of the gt string; tokenize by phasing
 *             phase_char = '/' if not self.phased else '|'
 *             alleles = self.gt_nums.split(phase_char)             # <<<<<<<<<<<<<<
 * 
 *             if len(alleles) == 2:
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->gt_nums), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_phase_char);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_phase_char);
    __Pyx_GIVEREF(__pyx_v_phase_char);
    __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 = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_alleles = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":219
 *             alleles = self.gt_nums.split(phase_char)
 * 
 *             if len(alleles) == 2:             # <<<<<<<<<<<<<<
 *                 (a1, a2) = alleles
 *                 if a1 == a2:
 */
    __pyx_t_4 = PyObject_Length(__pyx_v_alleles); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = (__pyx_t_4 == 2);
    if (__pyx_t_5) {

      /* "cyvcf/parser.pyx":220
 * 
 *             if len(alleles) == 2:
 *                 (a1, a2) = alleles             # <<<<<<<<<<<<<<
 *                 if a1 == a2:
 *                     if a1 == "0":
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_alleles))) || (PyList_CheckExact(__pyx_v_alleles))) {
        PyObject* sequence = __pyx_v_alleles;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_v_alleles); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L6_unpacking_done;
        __pyx_L5_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L6_unpacking_done:;
      }
      __pyx_v_a1 = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_a2 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":221
 *             if len(alleles) == 2:
 *                 (a1, a2) = alleles
 *                 if a1 == a2:             # <<<<<<<<<<<<<<
 *                     if a1 == "0":
 *                         gt_type = HOM_REF
 */
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_a1, __pyx_v_a2, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_5) {

        /* "cyvcf/parser.pyx":222
 *                 (a1, a2) = alleles
 *                 if a1 == a2:
 *                     if a1 == "0":             # <<<<<<<<<<<<<<
 *                         gt_type = HOM_REF
 *                     else:
 */
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_a1, ((PyObject *)__pyx_kp_s__0), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_5) {

          /* "cyvcf/parser.pyx":223
 *                 if a1 == a2:
 *                     if a1 == "0":
 *                         gt_type = HOM_REF             # <<<<<<<<<<<<<<
 *                     else:
 *                         gt_type = HOM_ALT
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_v_gt_type);
          __pyx_v_gt_type = __pyx_t_2;
          __pyx_t_2 = 0;
          goto __pyx_L8;
        }
        /*else*/ {

          /* "cyvcf/parser.pyx":225
 *                         gt_type = HOM_REF
 *                     else:
 *                         gt_type = HOM_ALT             # <<<<<<<<<<<<<<
 *                 else:
 *                     gt_type = HET
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_ALT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_v_gt_type);
          __pyx_v_gt_type = __pyx_t_2;
          __pyx_t_2 = 0;
        }
        __pyx_L8:;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":227
 *                         gt_type = HOM_ALT
 *                 else:
 *                     gt_type = HET             # <<<<<<<<<<<<<<
 *             elif len(alleles) == 1:
 *                 if alleles[0] == "0":
 */
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HET); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_v_gt_type);
        __pyx_v_gt_type = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_L7:;
      goto __pyx_L4;
    }

    /* "cyvcf/parser.pyx":228
 *                 else:
 *                     gt_type = HET
 *             elif len(alleles) == 1:             # <<<<<<<<<<<<<<
 *                 if alleles[0] == "0":
 *                     gt_type = HOM_REF
 */
    __pyx_t_4 = PyObject_Length(__pyx_v_alleles); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = (__pyx_t_4 == 1);
    if (__pyx_t_5) {

      /* "cyvcf/parser.pyx":229
 *                     gt_type = HET
 *             elif len(alleles) == 1:
 *                 if alleles[0] == "0":             # <<<<<<<<<<<<<<
 *                     gt_type = HOM_REF
 *                 else:
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_alleles, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s__0), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "cyvcf/parser.pyx":230
 *             elif len(alleles) == 1:
 *                 if alleles[0] == "0":
 *                     gt_type = HOM_REF             # <<<<<<<<<<<<<<
 *                 else:
 *                     gt_type = HOM_ALT
 */
        __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_v_gt_type);
        __pyx_v_gt_type = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":232
 *                     gt_type = HOM_REF
 *                 else:
 *                     gt_type = HOM_ALT             # <<<<<<<<<<<<<<
 * 
 *         return gt_type
 */
        __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_ALT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_v_gt_type);
        __pyx_v_gt_type = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L9:;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":234
 *                     gt_type = HOM_ALT
 * 
 *         return gt_type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_gt_type);
  __pyx_r = __pyx_v_gt_type;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_gt_type);
  __Pyx_XDECREF(__pyx_v_phase_char);
  __Pyx_XDECREF(__pyx_v_alleles);
  __Pyx_XDECREF(__pyx_v_a1);
  __Pyx_XDECREF(__pyx_v_a2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_13gt_depth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_12gt_depth[] = "The depth of aligned sequences that led to the genotype\n        call for this sample.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_13gt_depth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_depth (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_12gt_depth(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":237
 * 
 *     @property
 *     def gt_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that led to the genotype
 *         call for this sample.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_12gt_depth(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_depth = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_depth", 0);

  /* "cyvcf/parser.pyx":242
 *         '''
 *         # extract the numeric alleles of the gt string
 *         try:             # <<<<<<<<<<<<<<
 *             depth = self.data['DP']
 *             if depth is not None:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "cyvcf/parser.pyx":243
 *         # extract the numeric alleles of the gt string
 *         try:
 *             depth = self.data['DP']             # <<<<<<<<<<<<<<
 *             if depth is not None:
 *                 return depth
 */
      if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__DP)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_depth = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":244
 *         try:
 *             depth = self.data['DP']
 *             if depth is not None:             # <<<<<<<<<<<<<<
 *                 return depth
 *             else:
 */
      __pyx_t_5 = (__pyx_v_depth != Py_None);
      if (__pyx_t_5) {

        /* "cyvcf/parser.pyx":245
 *             depth = self.data['DP']
 *             if depth is not None:
 *                 return depth             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_depth);
        __pyx_r = __pyx_v_depth;
        goto __pyx_L7_try_return;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":247
 *                 return depth
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_r = __pyx_int_neg_1;
        goto __pyx_L7_try_return;
      }
      __pyx_L11:;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":248
 *             else:
 *                 return -1
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             return -1
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cyvcf.parser._Call.gt_depth", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "cyvcf/parser.pyx":249
 *                 return -1
 *         except KeyError:
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_depth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_depth);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_15gt_ref_depth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_14gt_ref_depth[] = "The depth of aligned sequences that supported the\n        reference allele for this sample.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_15gt_ref_depth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_ref_depth (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_14gt_ref_depth(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":252
 * 
 *     @property
 *     def gt_ref_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that supported the
 *         reference allele for this sample.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_14gt_ref_depth(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_depths = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_ref_depth", 0);

  /* "cyvcf/parser.pyx":257
 *         '''
 *         # extract the numeric alleles of the gt string
 *         if 'AD' in self.data:             # <<<<<<<<<<<<<<
 *             depths = self.data['AD']
 *             if depths is not None:
 */
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__AD), ((PyObject *)__pyx_v_self->data), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":258
 *         # extract the numeric alleles of the gt string
 *         if 'AD' in self.data:
 *             depths = self.data['AD']             # <<<<<<<<<<<<<<
 *             if depths is not None:
 *                 # require bi-allelic
 */
    if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__AD)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_depths = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":259
 *         if 'AD' in self.data:
 *             depths = self.data['AD']
 *             if depths is not None:             # <<<<<<<<<<<<<<
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:
 */
    __pyx_t_1 = (__pyx_v_depths != Py_None);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":261
 *             if depths is not None:
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:             # <<<<<<<<<<<<<<
 *                     return -1
 *                 else:
 */
      __Pyx_INCREF(__pyx_v_depths);
      __pyx_t_2 = __pyx_v_depths;
      __pyx_t_1 = PyList_Check(__pyx_t_2); 
      if (!__pyx_t_1) {
        __pyx_t_3 = PyTuple_Check(__pyx_t_2); 
        __pyx_t_4 = __pyx_t_3;
      } else {
        __pyx_t_4 = __pyx_t_1;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = (!__pyx_t_4);
      if (!__pyx_t_1) {
        __pyx_t_5 = PyObject_Length(__pyx_v_depths); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = (__pyx_t_5 != 2);
        __pyx_t_3 = __pyx_t_4;
      } else {
        __pyx_t_3 = __pyx_t_1;
      }
      if (__pyx_t_3) {

        /* "cyvcf/parser.pyx":262
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:
 *                     return -1             # <<<<<<<<<<<<<<
 *                 else:
 *                     # ref allele is first
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_r = __pyx_int_neg_1;
        goto __pyx_L0;
        goto __pyx_L5;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":265
 *                 else:
 *                     # ref allele is first
 *                     return depths[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_depths, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }
      __pyx_L5:;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":267
 *                     return depths[0]
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         elif 'RO' in self.data:
 *             if self.data['RO'] is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":268
 *             else:
 *                 return -1
 *         elif 'RO' in self.data:             # <<<<<<<<<<<<<<
 *             if self.data['RO'] is not None:
 *                 return self.data['RO']
 */
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__RO), ((PyObject *)__pyx_v_self->data), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":269
 *                 return -1
 *         elif 'RO' in self.data:
 *             if self.data['RO'] is not None:             # <<<<<<<<<<<<<<
 *                 return self.data['RO']
 *             else:
 */
    if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__RO)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = (__pyx_t_2 != Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":270
 *         elif 'RO' in self.data:
 *             if self.data['RO'] is not None:
 *                 return self.data['RO']             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__RO)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":272
 *                 return self.data['RO']
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         else:
 *             return -1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      goto __pyx_L0;
    }
    __pyx_L6:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":274
 *                 return -1
 *         else:
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_ref_depth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_depths);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_17gt_alt_depth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_16gt_alt_depth[] = "The depth of aligned sequences that supported the\n        alternate allele for this sample.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_17gt_alt_depth(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_alt_depth (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_16gt_alt_depth(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":277
 * 
 *     @property
 *     def gt_alt_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that supported the
 *         alternate allele for this sample.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_16gt_alt_depth(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_depths = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_alt_depth", 0);

  /* "cyvcf/parser.pyx":282
 *         '''
 *         # extract the numeric alleles of the gt string
 *         if 'AD' in self.data:             # <<<<<<<<<<<<<<
 *             depths = self.data['AD']
 *             if depths is not None:
 */
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__AD), ((PyObject *)__pyx_v_self->data), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":283
 *         # extract the numeric alleles of the gt string
 *         if 'AD' in self.data:
 *             depths = self.data['AD']             # <<<<<<<<<<<<<<
 *             if depths is not None:
 *                 # require bi-allelic
 */
    if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__AD)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_depths = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":284
 *         if 'AD' in self.data:
 *             depths = self.data['AD']
 *             if depths is not None:             # <<<<<<<<<<<<<<
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:
 */
    __pyx_t_1 = (__pyx_v_depths != Py_None);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":286
 *             if depths is not None:
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:             # <<<<<<<<<<<<<<
 *                     return -1
 *                 else:
 */
      __Pyx_INCREF(__pyx_v_depths);
      __pyx_t_2 = __pyx_v_depths;
      __pyx_t_1 = PyList_Check(__pyx_t_2); 
      if (!__pyx_t_1) {
        __pyx_t_3 = PyTuple_Check(__pyx_t_2); 
        __pyx_t_4 = __pyx_t_3;
      } else {
        __pyx_t_4 = __pyx_t_1;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = (!__pyx_t_4);
      if (!__pyx_t_1) {
        __pyx_t_5 = PyObject_Length(__pyx_v_depths); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = (__pyx_t_5 != 2);
        __pyx_t_3 = __pyx_t_4;
      } else {
        __pyx_t_3 = __pyx_t_1;
      }
      if (__pyx_t_3) {

        /* "cyvcf/parser.pyx":287
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:
 *                     return -1             # <<<<<<<<<<<<<<
 *                 else:
 *                     # ref allele is first
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_r = __pyx_int_neg_1;
        goto __pyx_L0;
        goto __pyx_L5;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":290
 *                 else:
 *                     # ref allele is first
 *                     return depths[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_depths, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }
      __pyx_L5:;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":292
 *                     return depths[0]
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         elif 'AO' in self.data:
 *             if self.data['AO'] is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":293
 *             else:
 *                 return -1
 *         elif 'AO' in self.data:             # <<<<<<<<<<<<<<
 *             if self.data['AO'] is not None:
 *                 return self.data['AO']
 */
  if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__AO), ((PyObject *)__pyx_v_self->data), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":294
 *                 return -1
 *         elif 'AO' in self.data:
 *             if self.data['AO'] is not None:             # <<<<<<<<<<<<<<
 *                 return self.data['AO']
 *             else:
 */
    if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__AO)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = (__pyx_t_2 != Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":295
 *         elif 'AO' in self.data:
 *             if self.data['AO'] is not None:
 *                 return self.data['AO']             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__AO)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":297
 *                 return self.data['AO']
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         else:
 *             return -1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      goto __pyx_L0;
    }
    __pyx_L6:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":299
 *                 return -1
 *         else:
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_alt_depth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_depths);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_19gt_qual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_18gt_qual[] = "The PHRED-scaled quality of genotype\n        call for this sample.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_19gt_qual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_qual (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_18gt_qual(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":302
 * 
 *     @property
 *     def gt_qual(self):             # <<<<<<<<<<<<<<
 *         '''The PHRED-scaled quality of genotype
 *         call for this sample.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_18gt_qual(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_qual = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_qual", 0);

  /* "cyvcf/parser.pyx":307
 *         '''
 *         # extract the numeric alleles of the gt string
 *         try:             # <<<<<<<<<<<<<<
 *             qual = self.data['GQ']
 *             if qual is not None:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "cyvcf/parser.pyx":308
 *         # extract the numeric alleles of the gt string
 *         try:
 *             qual = self.data['GQ']             # <<<<<<<<<<<<<<
 *             if qual is not None:
 *                 return qual
 */
      if (unlikely(((PyObject *)__pyx_v_self->data) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->data), ((PyObject *)__pyx_n_s__GQ)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_qual = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":309
 *         try:
 *             qual = self.data['GQ']
 *             if qual is not None:             # <<<<<<<<<<<<<<
 *                 return qual
 *             else:
 */
      __pyx_t_5 = (__pyx_v_qual != Py_None);
      if (__pyx_t_5) {

        /* "cyvcf/parser.pyx":310
 *             qual = self.data['GQ']
 *             if qual is not None:
 *                 return qual             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_qual);
        __pyx_r = __pyx_v_qual;
        goto __pyx_L7_try_return;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":312
 *                 return qual
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_r = __pyx_int_neg_1;
        goto __pyx_L7_try_return;
      }
      __pyx_L11:;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":313
 *             else:
 *                 return -1
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             return -1
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cyvcf.parser._Call.gt_qual", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "cyvcf/parser.pyx":314
 *                 return -1
 *         except KeyError:
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_qual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_qual);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_21is_variant(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_20is_variant[] = " Return True if not a reference call ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_21is_variant(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_variant (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_20is_variant(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":317
 * 
 *     @property
 *     def is_variant(self):             # <<<<<<<<<<<<<<
 *         """ Return True if not a reference call """
 *         if not self.called:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_20is_variant(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_variant", 0);

  /* "cyvcf/parser.pyx":319
 *     def is_variant(self):
 *         """ Return True if not a reference call """
 *         if not self.called:             # <<<<<<<<<<<<<<
 *             return None
 *         return self.gt_type != HOM_REF
 */
  __pyx_t_1 = (!__pyx_v_self->called);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":320
 *         """ Return True if not a reference call """
 *         if not self.called:
 *             return None             # <<<<<<<<<<<<<<
 *         return self.gt_type != HOM_REF
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":321
 *         if not self.called:
 *             return None
 *         return self.gt_type != HOM_REF             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Call.is_variant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_23is_het(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_22is_het[] = " Return True for heterozygous calls ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_23is_het(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_het (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_22is_het(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":324
 * 
 *     @property
 *     def is_het(self):             # <<<<<<<<<<<<<<
 *         """ Return True for heterozygous calls """
 *         if not self.called:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_22is_het(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_het", 0);

  /* "cyvcf/parser.pyx":326
 *     def is_het(self):
 *         """ Return True for heterozygous calls """
 *         if not self.called:             # <<<<<<<<<<<<<<
 *             return None
 *         return self.gt_type == HET
 */
  __pyx_t_1 = (!__pyx_v_self->called);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":327
 *         """ Return True for heterozygous calls """
 *         if not self.called:
 *             return None             # <<<<<<<<<<<<<<
 *         return self.gt_type == HET
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":328
 *         if not self.called:
 *             return None
 *         return self.gt_type == HET             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HET); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Call.is_het", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  char *__pyx_v_CHROM;
  int __pyx_v_POS;
  char *__pyx_v_ID;
  char *__pyx_v_REF;
  PyObject *__pyx_v_ALT = 0;
  PyObject *__pyx_v_QUAL = 0;
  PyObject *__pyx_v_FILTER = 0;
  PyObject *__pyx_v_INFO = 0;
  PyObject *__pyx_v_FORMAT = 0;
  PyObject *__pyx_v_sample_indexes = 0;
  PyObject *__pyx_v_samples = 0;
  PyObject *__pyx_v_gt_bases = 0;
  PyObject *__pyx_v_gt_types = 0;
  PyObject *__pyx_v_gt_phases = 0;
  PyObject *__pyx_v_gt_depths = 0;
  PyObject *__pyx_v_gt_ref_depths = 0;
  PyObject *__pyx_v_gt_alt_depths = 0;
  PyObject *__pyx_v_gt_quals = 0;
  int __pyx_v_num_hom_ref;
  int __pyx_v_num_het;
  int __pyx_v_num_hom_alt;
  int __pyx_v_num_unknown;
  int __pyx_v_num_called;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__CHROM,&__pyx_n_s__POS,&__pyx_n_s__ID,&__pyx_n_s__REF,&__pyx_n_s__ALT,&__pyx_n_s__QUAL,&__pyx_n_s__FILTER,&__pyx_n_s__INFO,&__pyx_n_s__FORMAT,&__pyx_n_s__sample_indexes,&__pyx_n_s__samples,&__pyx_n_s__gt_bases,&__pyx_n_s__gt_types,&__pyx_n_s__gt_phases,&__pyx_n_s__gt_depths,&__pyx_n_s__gt_ref_depths,&__pyx_n_s__gt_alt_depths,&__pyx_n_s__gt_quals,&__pyx_n_s__num_hom_ref,&__pyx_n_s__num_het,&__pyx_n_s__num_hom_alt,&__pyx_n_s__num_unknown,&__pyx_n_s__num_called,0};
    PyObject* values[23] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

    /* "cyvcf/parser.pyx":355
 * 
 *     def __cinit__(self, char *CHROM, int POS, char *ID,
 *                         char *REF, list ALT, object QUAL=None,             # <<<<<<<<<<<<<<
 *                         object FILTER=None, dict INFO=None, object FORMAT=None,
 *                         dict sample_indexes=None, list samples=None,
 */
    values[5] = ((PyObject *)Py_None);

    /* "cyvcf/parser.pyx":356
 *     def __cinit__(self, char *CHROM, int POS, char *ID,
 *                         char *REF, list ALT, object QUAL=None,
 *                         object FILTER=None, dict INFO=None, object FORMAT=None,             # <<<<<<<<<<<<<<
 *                         dict sample_indexes=None, list samples=None,
 *                         list gt_bases=None, list gt_types=None,
 */
    values[6] = ((PyObject *)Py_None);
    values[7] = ((PyObject*)Py_None);
    values[8] = ((PyObject *)Py_None);

    /* "cyvcf/parser.pyx":357
 *                         char *REF, list ALT, object QUAL=None,
 *                         object FILTER=None, dict INFO=None, object FORMAT=None,
 *                         dict sample_indexes=None, list samples=None,             # <<<<<<<<<<<<<<
 *                         list gt_bases=None, list gt_types=None,
 *                         list gt_phases=None, list gt_depths=None,
 */
    values[9] = ((PyObject*)Py_None);
    values[10] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":358
 *                         object FILTER=None, dict INFO=None, object FORMAT=None,
 *                         dict sample_indexes=None, list samples=None,
 *                         list gt_bases=None, list gt_types=None,             # <<<<<<<<<<<<<<
 *                         list gt_phases=None, list gt_depths=None,
 *                         list gt_ref_depths=None, list gt_alt_depths=None,
 */
    values[11] = ((PyObject*)Py_None);
    values[12] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":359
 *                         dict sample_indexes=None, list samples=None,
 *                         list gt_bases=None, list gt_types=None,
 *                         list gt_phases=None, list gt_depths=None,             # <<<<<<<<<<<<<<
 *                         list gt_ref_depths=None, list gt_alt_depths=None,
 *                         list gt_quals=None, int num_hom_ref=0,
 */
    values[13] = ((PyObject*)Py_None);
    values[14] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":360
 *                         list gt_bases=None, list gt_types=None,
 *                         list gt_phases=None, list gt_depths=None,
 *                         list gt_ref_depths=None, list gt_alt_depths=None,             # <<<<<<<<<<<<<<
 *                         list gt_quals=None, int num_hom_ref=0,
 *                         int num_het=0, int num_hom_alt=0,
 */
    values[15] = ((PyObject*)Py_None);
    values[16] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":361
 *                         list gt_phases=None, list gt_depths=None,
 *                         list gt_ref_depths=None, list gt_alt_depths=None,
 *                         list gt_quals=None, int num_hom_ref=0,             # <<<<<<<<<<<<<<
 *                         int num_het=0, int num_hom_alt=0,
 *                         int num_unknown=0, int num_called=0):
 */
    values[17] = ((PyObject*)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__CHROM)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__POS)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 23, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ID)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 23, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__REF)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 23, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ALT)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 23, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__QUAL);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__FILTER);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__INFO);
          if (value) { values[7] = value; kw_args--; }
        }
        case  8:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__FORMAT);
          if (value) { values[8] = value; kw_args--; }
        }
        case  9:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sample_indexes);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_bases);
          if (value) { values[11] = value; kw_args--; }
        }
        case 12:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_types);
          if (value) { values[12] = value; kw_args--; }
        }
        case 13:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_phases);
          if (value) { values[13] = value; kw_args--; }
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_depths);
          if (value) { values[14] = value; kw_args--; }
        }
        case 15:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_ref_depths);
          if (value) { values[15] = value; kw_args--; }
        }
        case 16:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_alt_depths);
          if (value) { values[16] = value; kw_args--; }
        }
        case 17:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__gt_quals);
          if (value) { values[17] = value; kw_args--; }
        }
        case 18:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__num_hom_ref);
          if (value) { values[18] = value; kw_args--; }
        }
        case 19:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__num_het);
          if (value) { values[19] = value; kw_args--; }
        }
        case 20:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__num_hom_alt);
          if (value) { values[20] = value; kw_args--; }
        }
        case 21:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__num_unknown);
          if (value) { values[21] = value; kw_args--; }
        }
        case 22:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__num_called);
          if (value) { values[22] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_CHROM = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_CHROM) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_POS = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_POS == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ID = PyBytes_AsString(values[2]); if (unlikely((!__pyx_v_ID) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_REF = PyBytes_AsString(values[3]); if (unlikely((!__pyx_v_REF) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ALT = ((PyObject*)values[4]);
    __pyx_v_QUAL = values[5];
    __pyx_v_FILTER = values[6];
    __pyx_v_INFO = ((PyObject*)values[7]);
    __pyx_v_FORMAT = values[8];
    __pyx_v_sample_indexes = ((PyObject*)values[9]);
    __pyx_v_samples = ((PyObject*)values[10]);
    __pyx_v_gt_bases = ((PyObject*)values[11]);
    __pyx_v_gt_types = ((PyObject*)values[12]);
    __pyx_v_gt_phases = ((PyObject*)values[13]);
    __pyx_v_gt_depths = ((PyObject*)values[14]);
    __pyx_v_gt_ref_depths = ((PyObject*)values[15]);
    __pyx_v_gt_alt_depths = ((PyObject*)values[16]);
    __pyx_v_gt_quals = ((PyObject*)values[17]);
    if (values[18]) {
      __pyx_v_num_hom_ref = __Pyx_PyInt_AsInt(values[18]); if (unlikely((__pyx_v_num_hom_ref == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_hom_ref = ((int)0);
    }
    if (values[19]) {
      __pyx_v_num_het = __Pyx_PyInt_AsInt(values[19]); if (unlikely((__pyx_v_num_het == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_het = ((int)0);
    }
    if (values[20]) {
      __pyx_v_num_hom_alt = __Pyx_PyInt_AsInt(values[20]); if (unlikely((__pyx_v_num_hom_alt == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_hom_alt = ((int)0);
    }
    if (values[21]) {
      __pyx_v_num_unknown = __Pyx_PyInt_AsInt(values[21]); if (unlikely((__pyx_v_num_unknown == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_unknown = ((int)0);
    }
    if (values[22]) {
      __pyx_v_num_called = __Pyx_PyInt_AsInt(values[22]); if (unlikely((__pyx_v_num_called == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_called = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 23, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ALT), (&PyList_Type), 1, "ALT", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_INFO), (&PyDict_Type), 1, "INFO", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sample_indexes), (&PyDict_Type), 1, "sample_indexes", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samples), (&PyList_Type), 1, "samples", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_bases), (&PyList_Type), 1, "gt_bases", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_types), (&PyList_Type), 1, "gt_types", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_phases), (&PyList_Type), 1, "gt_phases", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_depths), (&PyList_Type), 1, "gt_depths", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_ref_depths), (&PyList_Type), 1, "gt_ref_depths", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_alt_depths), (&PyList_Type), 1, "gt_alt_depths", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_quals), (&PyList_Type), 1, "gt_quals", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record___cinit__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), __pyx_v_CHROM, __pyx_v_POS, __pyx_v_ID, __pyx_v_REF, __pyx_v_ALT, __pyx_v_QUAL, __pyx_v_FILTER, __pyx_v_INFO, __pyx_v_FORMAT, __pyx_v_sample_indexes, __pyx_v_samples, __pyx_v_gt_bases, __pyx_v_gt_types, __pyx_v_gt_phases, __pyx_v_gt_depths, __pyx_v_gt_ref_depths, __pyx_v_gt_alt_depths, __pyx_v_gt_quals, __pyx_v_num_hom_ref, __pyx_v_num_het, __pyx_v_num_hom_alt, __pyx_v_num_unknown, __pyx_v_num_called);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":354
 *     cdef bint has_genotypes
 * 
 *     def __cinit__(self, char *CHROM, int POS, char *ID,             # <<<<<<<<<<<<<<
 *                         char *REF, list ALT, object QUAL=None,
 *                         object FILTER=None, dict INFO=None, object FORMAT=None,
 */

static int __pyx_pf_5cyvcf_6parser_7_Record___cinit__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, char *__pyx_v_CHROM, int __pyx_v_POS, char *__pyx_v_ID, char *__pyx_v_REF, PyObject *__pyx_v_ALT, PyObject *__pyx_v_QUAL, PyObject *__pyx_v_FILTER, PyObject *__pyx_v_INFO, PyObject *__pyx_v_FORMAT, PyObject *__pyx_v_sample_indexes, PyObject *__pyx_v_samples, PyObject *__pyx_v_gt_bases, PyObject *__pyx_v_gt_types, PyObject *__pyx_v_gt_phases, PyObject *__pyx_v_gt_depths, PyObject *__pyx_v_gt_ref_depths, PyObject *__pyx_v_gt_alt_depths, PyObject *__pyx_v_gt_quals, int __pyx_v_num_hom_ref, int __pyx_v_num_het, int __pyx_v_num_hom_alt, int __pyx_v_num_unknown, int __pyx_v_num_called) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cyvcf/parser.pyx":365
 *                         int num_unknown=0, int num_called=0):
 *         # CORE VCF fields
 *         self.CHROM = CHROM             # <<<<<<<<<<<<<<
 *         self.POS = POS
 *         self.ID = ID
 */
  __pyx_t_1 = PyBytes_FromString(__pyx_v_CHROM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->CHROM);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->CHROM));
  __pyx_v_self->CHROM = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":366
 *         # CORE VCF fields
 *         self.CHROM = CHROM
 *         self.POS = POS             # <<<<<<<<<<<<<<
 *         self.ID = ID
 *         self.REF = REF
 */
  __pyx_v_self->POS = __pyx_v_POS;

  /* "cyvcf/parser.pyx":367
 *         self.CHROM = CHROM
 *         self.POS = POS
 *         self.ID = ID             # <<<<<<<<<<<<<<
 *         self.REF = REF
 *         self.ALT = ALT
 */
  __pyx_t_1 = PyBytes_FromString(__pyx_v_ID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->ID);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->ID));
  __pyx_v_self->ID = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":368
 *         self.POS = POS
 *         self.ID = ID
 *         self.REF = REF             # <<<<<<<<<<<<<<
 *         self.ALT = ALT
 *         self.QUAL = QUAL
 */
  __pyx_t_1 = PyBytes_FromString(__pyx_v_REF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->REF);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->REF));
  __pyx_v_self->REF = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":369
 *         self.ID = ID
 *         self.REF = REF
 *         self.ALT = ALT             # <<<<<<<<<<<<<<
 *         self.QUAL = QUAL
 *         self.FILTER = FILTER
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_ALT));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_ALT));
  __Pyx_GOTREF(__pyx_v_self->ALT);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->ALT));
  __pyx_v_self->ALT = __pyx_v_ALT;

  /* "cyvcf/parser.pyx":370
 *         self.REF = REF
 *         self.ALT = ALT
 *         self.QUAL = QUAL             # <<<<<<<<<<<<<<
 *         self.FILTER = FILTER
 *         self.INFO = INFO
 */
  __Pyx_INCREF(__pyx_v_QUAL);
  __Pyx_GIVEREF(__pyx_v_QUAL);
  __Pyx_GOTREF(__pyx_v_self->QUAL);
  __Pyx_DECREF(__pyx_v_self->QUAL);
  __pyx_v_self->QUAL = __pyx_v_QUAL;

  /* "cyvcf/parser.pyx":371
 *         self.ALT = ALT
 *         self.QUAL = QUAL
 *         self.FILTER = FILTER             # <<<<<<<<<<<<<<
 *         self.INFO = INFO
 *         self.FORMAT = FORMAT
 */
  __Pyx_INCREF(__pyx_v_FILTER);
  __Pyx_GIVEREF(__pyx_v_FILTER);
  __Pyx_GOTREF(__pyx_v_self->FILTER);
  __Pyx_DECREF(__pyx_v_self->FILTER);
  __pyx_v_self->FILTER = __pyx_v_FILTER;

  /* "cyvcf/parser.pyx":372
 *         self.QUAL = QUAL
 *         self.FILTER = FILTER
 *         self.INFO = INFO             # <<<<<<<<<<<<<<
 *         self.FORMAT = FORMAT
 *         # DERIVED fields
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_INFO));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_INFO));
  __Pyx_GOTREF(__pyx_v_self->INFO);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->INFO));
  __pyx_v_self->INFO = __pyx_v_INFO;

  /* "cyvcf/parser.pyx":373
 *         self.FILTER = FILTER
 *         self.INFO = INFO
 *         self.FORMAT = FORMAT             # <<<<<<<<<<<<<<
 *         # DERIVED fields
 *         self.start = self.POS - 1
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_FORMAT))||((__pyx_v_FORMAT) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_FORMAT)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_FORMAT);
  __Pyx_GIVEREF(__pyx_v_FORMAT);
  __Pyx_GOTREF(__pyx_v_self->FORMAT);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->FORMAT));
  __pyx_v_self->FORMAT = ((PyObject*)__pyx_v_FORMAT);

  /* "cyvcf/parser.pyx":375
 *         self.FORMAT = FORMAT
 *         # DERIVED fields
 *         self.start = self.POS - 1             # <<<<<<<<<<<<<<
 *         self.end = self.start + len(self.REF)
 *         self.alleles = [self.REF]
 */
  __pyx_v_self->start = (__pyx_v_self->POS - 1);

  /* "cyvcf/parser.pyx":376
 *         # DERIVED fields
 *         self.start = self.POS - 1
 *         self.end = self.start + len(self.REF)             # <<<<<<<<<<<<<<
 *         self.alleles = [self.REF]
 *         self.alleles.extend(self.ALT)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->REF);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->end = (__pyx_v_self->start + __pyx_t_2);

  /* "cyvcf/parser.pyx":377
 *         self.start = self.POS - 1
 *         self.end = self.start + len(self.REF)
 *         self.alleles = [self.REF]             # <<<<<<<<<<<<<<
 *         self.alleles.extend(self.ALT)
 *         self.samples = samples
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->REF));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->REF));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->REF));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->alleles);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->alleles));
  __pyx_v_self->alleles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":378
 *         self.end = self.start + len(self.REF)
 *         self.alleles = [self.REF]
 *         self.alleles.extend(self.ALT)             # <<<<<<<<<<<<<<
 *         self.samples = samples
 *         self._sample_indexes = sample_indexes
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->alleles), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->ALT));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->ALT));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->ALT));
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":379
 *         self.alleles = [self.REF]
 *         self.alleles.extend(self.ALT)
 *         self.samples = samples             # <<<<<<<<<<<<<<
 *         self._sample_indexes = sample_indexes
 *         self.gt_bases = gt_bases
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_samples));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_samples));
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->samples));
  __pyx_v_self->samples = __pyx_v_samples;

  /* "cyvcf/parser.pyx":380
 *         self.alleles.extend(self.ALT)
 *         self.samples = samples
 *         self._sample_indexes = sample_indexes             # <<<<<<<<<<<<<<
 *         self.gt_bases = gt_bases
 *         self.gt_types = gt_types
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_sample_indexes));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_sample_indexes));
  __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_sample_indexes));
  __pyx_v_self->_sample_indexes = __pyx_v_sample_indexes;

  /* "cyvcf/parser.pyx":381
 *         self.samples = samples
 *         self._sample_indexes = sample_indexes
 *         self.gt_bases = gt_bases             # <<<<<<<<<<<<<<
 *         self.gt_types = gt_types
 *         self.gt_phases = gt_phases
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_bases));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_bases));
  __Pyx_GOTREF(__pyx_v_self->gt_bases);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_bases));
  __pyx_v_self->gt_bases = __pyx_v_gt_bases;

  /* "cyvcf/parser.pyx":382
 *         self._sample_indexes = sample_indexes
 *         self.gt_bases = gt_bases
 *         self.gt_types = gt_types             # <<<<<<<<<<<<<<
 *         self.gt_phases = gt_phases
 *         self.gt_depths = gt_depths
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_types));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_types));
  __Pyx_GOTREF(__pyx_v_self->gt_types);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_types));
  __pyx_v_self->gt_types = __pyx_v_gt_types;

  /* "cyvcf/parser.pyx":383
 *         self.gt_bases = gt_bases
 *         self.gt_types = gt_types
 *         self.gt_phases = gt_phases             # <<<<<<<<<<<<<<
 *         self.gt_depths = gt_depths
 *         self.gt_ref_depths = gt_ref_depths
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_phases));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_phases));
  __Pyx_GOTREF(__pyx_v_self->gt_phases);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_phases));
  __pyx_v_self->gt_phases = __pyx_v_gt_phases;

  /* "cyvcf/parser.pyx":384
 *         self.gt_types = gt_types
 *         self.gt_phases = gt_phases
 *         self.gt_depths = gt_depths             # <<<<<<<<<<<<<<
 *         self.gt_ref_depths = gt_ref_depths
 *         self.gt_alt_depths = gt_alt_depths
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_depths));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_depths));
  __Pyx_GOTREF(__pyx_v_self->gt_depths);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_depths));
  __pyx_v_self->gt_depths = __pyx_v_gt_depths;

  /* "cyvcf/parser.pyx":385
 *         self.gt_phases = gt_phases
 *         self.gt_depths = gt_depths
 *         self.gt_ref_depths = gt_ref_depths             # <<<<<<<<<<<<<<
 *         self.gt_alt_depths = gt_alt_depths
 *         self.gt_quals = gt_quals
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_ref_depths));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_ref_depths));
  __Pyx_GOTREF(__pyx_v_self->gt_ref_depths);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_ref_depths));
  __pyx_v_self->gt_ref_depths = __pyx_v_gt_ref_depths;

  /* "cyvcf/parser.pyx":386
 *         self.gt_depths = gt_depths
 *         self.gt_ref_depths = gt_ref_depths
 *         self.gt_alt_depths = gt_alt_depths             # <<<<<<<<<<<<<<
 *         self.gt_quals = gt_quals
 *         self.num_hom_ref = num_hom_ref
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_alt_depths));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_alt_depths));
  __Pyx_GOTREF(__pyx_v_self->gt_alt_depths);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_alt_depths));
  __pyx_v_self->gt_alt_depths = __pyx_v_gt_alt_depths;

  /* "cyvcf/parser.pyx":387
 *         self.gt_ref_depths = gt_ref_depths
 *         self.gt_alt_depths = gt_alt_depths
 *         self.gt_quals = gt_quals             # <<<<<<<<<<<<<<
 *         self.num_hom_ref = num_hom_ref
 *         self.num_het = num_het
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_gt_quals));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_gt_quals));
  __Pyx_GOTREF(__pyx_v_self->gt_quals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->gt_quals));
  __pyx_v_self->gt_quals = __pyx_v_gt_quals;

  /* "cyvcf/parser.pyx":388
 *         self.gt_alt_depths = gt_alt_depths
 *         self.gt_quals = gt_quals
 *         self.num_hom_ref = num_hom_ref             # <<<<<<<<<<<<<<
 *         self.num_het = num_het
 *         self.num_hom_alt = num_hom_alt
 */
  __pyx_v_self->num_hom_ref = __pyx_v_num_hom_ref;

  /* "cyvcf/parser.pyx":389
 *         self.gt_quals = gt_quals
 *         self.num_hom_ref = num_hom_ref
 *         self.num_het = num_het             # <<<<<<<<<<<<<<
 *         self.num_hom_alt = num_hom_alt
 *         self.num_unknown = num_unknown
 */
  __pyx_v_self->num_het = __pyx_v_num_het;

  /* "cyvcf/parser.pyx":390
 *         self.num_hom_ref = num_hom_ref
 *         self.num_het = num_het
 *         self.num_hom_alt = num_hom_alt             # <<<<<<<<<<<<<<
 *         self.num_unknown = num_unknown
 *         self.num_called = num_called
 */
  __pyx_v_self->num_hom_alt = __pyx_v_num_hom_alt;

  /* "cyvcf/parser.pyx":391
 *         self.num_het = num_het
 *         self.num_hom_alt = num_hom_alt
 *         self.num_unknown = num_unknown             # <<<<<<<<<<<<<<
 *         self.num_called = num_called
 *         if self.FORMAT is not None and sample_indexes is not None:
 */
  __pyx_v_self->num_unknown = __pyx_v_num_unknown;

  /* "cyvcf/parser.pyx":392
 *         self.num_hom_alt = num_hom_alt
 *         self.num_unknown = num_unknown
 *         self.num_called = num_called             # <<<<<<<<<<<<<<
 *         if self.FORMAT is not None and sample_indexes is not None:
 *             self.has_genotypes = True
 */
  __pyx_v_self->num_called = __pyx_v_num_called;

  /* "cyvcf/parser.pyx":393
 *         self.num_unknown = num_unknown
 *         self.num_called = num_called
 *         if self.FORMAT is not None and sample_indexes is not None:             # <<<<<<<<<<<<<<
 *             self.has_genotypes = True
 *         else:
 */
  __pyx_t_5 = (__pyx_v_self->FORMAT != ((PyObject*)Py_None));
  if (__pyx_t_5) {
    __pyx_t_6 = (__pyx_v_sample_indexes != ((PyObject*)Py_None));
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_5;
  }
  if (__pyx_t_7) {

    /* "cyvcf/parser.pyx":394
 *         self.num_called = num_called
 *         if self.FORMAT is not None and sample_indexes is not None:
 *             self.has_genotypes = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.has_genotypes = False
 */
    __pyx_v_self->has_genotypes = 1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":396
 *             self.has_genotypes = True
 *         else:
 *             self.has_genotypes = False             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
    __pyx_v_self->has_genotypes = 0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Record.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_2__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":398
 *             self.has_genotypes = False
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         """ _Records are equal if they describe the same variant (same position, alleles) """
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_2__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "cyvcf/parser.pyx":402
 * 
 *         # < 0 | <= 1 | == 2 | != 3 |  > 4 | >= 5
 *         if op == 2: # 2             # <<<<<<<<<<<<<<
 *             return (self.CHROM == other.CHROM and
 *                     self.POS == other.POS and
 */
  __pyx_t_1 = (__pyx_v_op == 2);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":403
 *         # < 0 | <= 1 | == 2 | != 3 |  > 4 | >= 5
 *         if op == 2: # 2
 *             return (self.CHROM == other.CHROM and             # <<<<<<<<<<<<<<
 *                     self.POS == other.POS and
 *                     self.REF == other.REF and
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__CHROM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__CHROM); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":404
 *         if op == 2: # 2
 *             return (self.CHROM == other.CHROM and
 *                     self.POS == other.POS and             # <<<<<<<<<<<<<<
 *                     self.REF == other.REF and
 *                     self.ALT == other.ALT)
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__POS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cyvcf/parser.pyx":405
 *             return (self.CHROM == other.CHROM and
 *                     self.POS == other.POS and
 *                     self.REF == other.REF and             # <<<<<<<<<<<<<<
 *                     self.ALT == other.ALT)
 * 
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "cyvcf/parser.pyx":406
 *                     self.POS == other.POS and
 *                     self.REF == other.REF and
 *                     self.ALT == other.ALT)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
          __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ALT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__ALT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __pyx_t_7;
          __pyx_t_7 = 0;
        } else {
          __pyx_t_2 = __pyx_t_6;
          __pyx_t_6 = 0;
        }
        __pyx_t_6 = __pyx_t_2;
        __pyx_t_2 = 0;
      } else {
        __pyx_t_6 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_t_5 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cyvcf.parser._Record.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_5__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_5__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_4__iter__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":408
 *                     self.ALT == other.ALT)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.samples)
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4__iter__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cyvcf/parser.pyx":409
 * 
 *     def __iter__(self):
 *         return iter(self.samples)             # <<<<<<<<<<<<<<
 * 
 *     def _format_alt(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->samples);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Record.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7_format_alt(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7_format_alt(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_alt (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_6_format_alt(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":411
 *         return iter(self.samples)
 * 
 *     def _format_alt(self):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in self.ALT])
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_6_format_alt(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_alt", 0);

  /* "cyvcf/parser.pyx":412
 * 
 *     def _format_alt(self):
 *         return ','.join([x or '.' for x in self.ALT])             # <<<<<<<<<<<<<<
 * 
 *     def _format_qual(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_32), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = ((PyObject *)__pyx_v_self->ALT); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_6) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
      __pyx_t_5 = __pyx_kp_s_33;
    } else {
      __Pyx_INCREF(__pyx_v_x);
      __pyx_t_5 = __pyx_v_x;
    }
    if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record._format_alt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_9_format_qual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_9_format_qual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_qual (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8_format_qual(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":414
 *         return ','.join([x or '.' for x in self.ALT])
 * 
 *     def _format_qual(self):             # <<<<<<<<<<<<<<
 *         return str(self.QUAL) if self.QUAL is not None else None
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8_format_qual(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_qual", 0);

  /* "cyvcf/parser.pyx":415
 * 
 *     def _format_qual(self):
 *         return str(self.QUAL) if self.QUAL is not None else None             # <<<<<<<<<<<<<<
 * 
 *     def _format_info(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->QUAL != Py_None);
  if (__pyx_t_2) {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_self->QUAL);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->QUAL);
    __Pyx_GIVEREF(__pyx_v_self->QUAL);
    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Record._format_qual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11_format_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11_format_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_info (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_10_format_info(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":417
 *         return str(self.QUAL) if self.QUAL is not None else None
 * 
 *     def _format_info(self):             # <<<<<<<<<<<<<<
 *         if not self.INFO:
 *             return '.'
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_10_format_info(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_info", 0);

  /* "cyvcf/parser.pyx":418
 * 
 *     def _format_info(self):
 *         if not self.INFO:             # <<<<<<<<<<<<<<
 *             return '.'
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in self.INFO.items()])
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->INFO)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":419
 *     def _format_info(self):
 *         if not self.INFO:
 *             return '.'             # <<<<<<<<<<<<<<
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in self.INFO.items()])
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
    __pyx_r = ((PyObject *)__pyx_kp_s_33);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":420
 *         if not self.INFO:
 *             return '.'
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in self.INFO.items()])             # <<<<<<<<<<<<<<
 * 
 *     def _format_sample(self, sample):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_34), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = PyDict_Items(__pyx_v_self->INFO); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_5)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_10);
      #else
      __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
      index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_9;
    __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_v_y);
    __pyx_v_y = __pyx_t_10;
    __pyx_t_10 = 0;
    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___stringify); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_y);
    __Pyx_GIVEREF(__pyx_v_y);
    __pyx_t_9 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_35), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cyvcf.parser._Record._format_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13_format_sample(PyObject *__pyx_v_self, PyObject *__pyx_v_sample); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13_format_sample(PyObject *__pyx_v_self, PyObject *__pyx_v_sample) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_sample (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_12_format_sample(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_sample));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5cyvcf_6parser_7_Record_14_format_sample_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "cyvcf/parser.pyx":425
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_14_format_sample_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_1_genexpr->tp_new(__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5cyvcf_6parser_7_Record_14_format_sample_2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record._format_sample.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5cyvcf_6parser_7_Record_14_format_sample_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->FORMAT), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_v_f = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s___stringify); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample)) { __Pyx_RaiseClosureNameError("sample"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample, __pyx_n_s__data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "cyvcf/parser.pyx":422
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in self.INFO.items()])
 * 
 *     def _format_sample(self, sample):             # <<<<<<<<<<<<<<
 *         if sample.data["GT"] is None:
 *             return "./."
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_12_format_sample(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_sample) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_sample", 0);
  __pyx_cur_scope = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)__pyx_ptype_5cyvcf_6parser___pyx_scope_struct___format_sample->tp_new(__pyx_ptype_5cyvcf_6parser___pyx_scope_struct___format_sample, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_sample = __pyx_v_sample;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sample);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sample);

  /* "cyvcf/parser.pyx":423
 * 
 *     def _format_sample(self, sample):
 *         if sample.data["GT"] is None:             # <<<<<<<<<<<<<<
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_sample, __pyx_n_s__data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":424
 *     def _format_sample(self, sample):
 *         if sample.data["GT"] is None:
 *             return "./."             # <<<<<<<<<<<<<<
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
    __pyx_r = ((PyObject *)__pyx_kp_s_38);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":425
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_36), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_pf_5cyvcf_6parser_7_Record_14_format_sample_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Record._format_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_15_stringify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_15_stringify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_none = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_stringify (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__none,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_kp_s_33);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__none);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_stringify") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_x = values[0];
    __pyx_v_none = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_stringify", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record._stringify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_14_stringify(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), __pyx_v_x, __pyx_v_none);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":427
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))
 * 
 *     def _stringify(self, x, none='.'):             # <<<<<<<<<<<<<<
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_14_stringify(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_none) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_stringify", 0);

  /* "cyvcf/parser.pyx":428
 * 
 *     def _stringify(self, x, none='.'):
 *         if type(x) == type([]):             # <<<<<<<<<<<<<<
 *             return ','.join(self._map(str, x, none))
 *         return str(x) if x is not None else none
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_x)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_t_1))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":429
 *     def _stringify(self, x, none='.'):
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))             # <<<<<<<<<<<<<<
 *         return str(x) if x is not None else none
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_32), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(__pyx_v_none);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_none);
    __Pyx_GIVEREF(__pyx_v_none);
    __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 = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":430
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))
 *         return str(x) if x is not None else none             # <<<<<<<<<<<<<<
 * 
 *     def _map(self, func, iterable, none='.'):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = (__pyx_v_x != Py_None);
  if (__pyx_t_3) {
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_none);
    __pyx_t_5 = __pyx_v_none;
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record._stringify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_17_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_16_map[] = "``map``, but make None values none.";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_17_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_iterable = 0;
  PyObject *__pyx_v_none = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_map (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__iterable,&__pyx_n_s__none,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_kp_s_33);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_map", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__none);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_map") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_iterable = values[1];
    __pyx_v_none = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_map", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_16_map(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), __pyx_v_func, __pyx_v_iterable, __pyx_v_none);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":432
 *         return str(x) if x is not None else none
 * 
 *     def _map(self, func, iterable, none='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_16_map(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, PyObject *__pyx_v_none) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_map", 0);

  /* "cyvcf/parser.pyx":434
 *     def _map(self, func, iterable, none='.'):
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none             # <<<<<<<<<<<<<<
 *                 for x in iterable]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":435
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  if (PyList_CheckExact(__pyx_v_iterable) || PyTuple_CheckExact(__pyx_v_iterable)) {
    __pyx_t_2 = __pyx_v_iterable; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_iterable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":434
 *     def _map(self, func, iterable, none='.'):
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none             # <<<<<<<<<<<<<<
 *                 for x in iterable]
 * 
 */
    __pyx_t_6 = (__pyx_v_x != Py_None);
    if (__pyx_t_6) {
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __pyx_t_8 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {

      /* "cyvcf/parser.pyx":435
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
      __Pyx_INCREF(__pyx_v_none);
      __pyx_t_5 = __pyx_v_none;
    }
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cyvcf.parser._Record._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_19__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_19__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_18__repr__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":437
 *                 for x in iterable]
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.has_genotypes == True:
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_18__repr__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_core = NULL;
  PyObject *__pyx_v_samples = NULL;
  PyObject *__pyx_v_sample = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cyvcf/parser.pyx":438
 * 
 *     def __repr__(self):
 *         if self.has_genotypes == True:             # <<<<<<<<<<<<<<
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info(), self.FORMAT])
 */
  __pyx_t_1 = (__pyx_v_self->has_genotypes == 1);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":439
 *     def __repr__(self):
 *         if self.has_genotypes == True:
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),             # <<<<<<<<<<<<<<
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info(), self.FORMAT])
 *             samples = "\t".join([self._format_sample(sample) for sample in self.samples])
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_39), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyInt_FromLong(__pyx_v_self->POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->REF));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->REF));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->REF));
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_alt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":440
 *         if self.has_genotypes == True:
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info(), self.FORMAT])             # <<<<<<<<<<<<<<
 *             samples = "\t".join([self._format_sample(sample) for sample in self.samples])
 *             return core + "\t" + samples
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_qual); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __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 = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
      __pyx_t_4 = __pyx_kp_s_33;
    } else {
      __pyx_t_4 = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->FILTER); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
      __pyx_t_7 = __pyx_kp_s_33;
    } else {
      __Pyx_INCREF(__pyx_v_self->FILTER);
      __pyx_t_7 = __pyx_v_self->FILTER;
    }
    __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyList_New(8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->CHROM));
    PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self->CHROM));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->CHROM));
    PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_8, 4, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_8, 5, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_8, 6, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->FORMAT));
    PyList_SET_ITEM(__pyx_t_8, 7, ((PyObject *)__pyx_v_self->FORMAT));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->FORMAT));
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_4 = 0;
    __pyx_t_7 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_v_core = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":441
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info(), self.FORMAT])
 *             samples = "\t".join([self._format_sample(sample) for sample in self.samples])             # <<<<<<<<<<<<<<
 *             return core + "\t" + samples
 *         else:
 */
    __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_39), __pyx_n_s__join); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = ((PyObject *)__pyx_v_self->samples); __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF(__pyx_v_sample);
      __pyx_v_sample = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_sample); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_sample);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sample);
      __Pyx_GIVEREF(__pyx_v_sample);
      __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      if (unlikely(__Pyx_PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_t_9));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_9));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __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 = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_samples = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "cyvcf/parser.pyx":442
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info(), self.FORMAT])
 *             samples = "\t".join([self._format_sample(sample) for sample in self.samples])
 *             return core + "\t" + samples             # <<<<<<<<<<<<<<
 *         else:
 *             return "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = PyNumber_Add(__pyx_v_core, ((PyObject *)__pyx_kp_s_39)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_v_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":444
 *             return core + "\t" + samples
 *         else:
 *             return "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),             # <<<<<<<<<<<<<<
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info()])
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_39), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PyInt_FromLong(__pyx_v_self->POS); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->REF));
    PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self->REF));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->REF));
    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_alt); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":445
 *         else:
 *             return "\t".join([self.CHROM, str(self.POS), str(self.REF), self._format_alt(),
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info()])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_qual); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
      __pyx_t_8 = __pyx_kp_s_33;
    } else {
      __pyx_t_8 = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->FILTER); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
      __pyx_t_7 = __pyx_kp_s_33;
    } else {
      __Pyx_INCREF(__pyx_v_self->FILTER);
      __pyx_t_7 = __pyx_v_self->FILTER;
    }
    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___format_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->CHROM));
    PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->CHROM));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->CHROM));
    PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_5, 4, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_5, 5, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_5, 6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_9 = 0;
    __pyx_t_6 = 0;
    __pyx_t_4 = 0;
    __pyx_t_8 = 0;
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cyvcf.parser._Record.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_core);
  __Pyx_XDECREF(__pyx_v_samples);
  __Pyx_XDECREF(__pyx_v_sample);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
#if PY_MAJOR_VERSION < 3
static int __pyx_pw_5cyvcf_6parser_7_Record_21__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_21__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_20__cmp__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* "cyvcf/parser.pyx":448
 * 
 * 
 *     def __cmp__(self, other):             # <<<<<<<<<<<<<<
 *         return cmp( (self.CHROM, self.POS), (other.CHROM, other.POS))
 * 
 */

#if PY_MAJOR_VERSION < 3
static int __pyx_pf_5cyvcf_6parser_7_Record_20__cmp__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cmp__", 0);

  /* "cyvcf/parser.pyx":449
 * 
 *     def __cmp__(self, other):
 *         return cmp( (self.CHROM, self.POS), (other.CHROM, other.POS))             # <<<<<<<<<<<<<<
 * 
 *     def add_format(self, fmt):
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->POS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->CHROM));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->CHROM));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->CHROM));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__CHROM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Record.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_23add_format(PyObject *__pyx_v_self, PyObject *__pyx_v_fmt); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_23add_format(PyObject *__pyx_v_self, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_format (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_22add_format(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_fmt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":451
 *         return cmp( (self.CHROM, self.POS), (other.CHROM, other.POS))
 * 
 *     def add_format(self, fmt):             # <<<<<<<<<<<<<<
 *         tmp = self.FORMAT + ':' + fmt
 *         self.FORMAT = tmp
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_22add_format(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_tmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_format", 0);

  /* "cyvcf/parser.pyx":452
 * 
 *     def add_format(self, fmt):
 *         tmp = self.FORMAT + ':' + fmt             # <<<<<<<<<<<<<<
 *         self.FORMAT = tmp
 * 
 */
  __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_self->FORMAT), ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_fmt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tmp = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":453
 *     def add_format(self, fmt):
 *         tmp = self.FORMAT + ':' + fmt
 *         self.FORMAT = tmp             # <<<<<<<<<<<<<<
 * 
 *     def add_filter(self, flt):
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_tmp))||((__pyx_v_tmp) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_tmp)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_tmp);
  __Pyx_GIVEREF(__pyx_v_tmp);
  __Pyx_GOTREF(__pyx_v_self->FORMAT);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->FORMAT));
  __pyx_v_self->FORMAT = ((PyObject*)__pyx_v_tmp);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Record.add_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_25add_filter(PyObject *__pyx_v_self, PyObject *__pyx_v_flt); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_25add_filter(PyObject *__pyx_v_self, PyObject *__pyx_v_flt) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_filter (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_24add_filter(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_flt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":455
 *         self.FORMAT = tmp
 * 
 *     def add_filter(self, flt):             # <<<<<<<<<<<<<<
 *         if self.FILTER is None or self.FILTER == b'PASS':
 *             self.FILTER = b''
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_24add_filter(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_flt) {
  PyObject *__pyx_v_tmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_filter", 0);

  /* "cyvcf/parser.pyx":456
 * 
 *     def add_filter(self, flt):
 *         if self.FILTER is None or self.FILTER == b'PASS':             # <<<<<<<<<<<<<<
 *             self.FILTER = b''
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->FILTER == Py_None);
  if (!__pyx_t_1) {
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->FILTER, ((PyObject *)__pyx_n_b__PASS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_1;
  }
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":457
 *     def add_filter(self, flt):
 *         if self.FILTER is None or self.FILTER == b'PASS':
 *             self.FILTER = b''             # <<<<<<<<<<<<<<
 *         else:
 *             tmp = self.FILTER + ';'
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_b_28));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_28));
    __Pyx_GOTREF(__pyx_v_self->FILTER);
    __Pyx_DECREF(__pyx_v_self->FILTER);
    __pyx_v_self->FILTER = ((PyObject *)__pyx_kp_b_28);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":459
 *             self.FILTER = b''
 *         else:
 *             tmp = self.FILTER + ';'             # <<<<<<<<<<<<<<
 *             self.FILTER = tmp
 *         tmp = self.FILTER + flt
 */
    __pyx_t_2 = PyNumber_Add(__pyx_v_self->FILTER, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_tmp = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":460
 *         else:
 *             tmp = self.FILTER + ';'
 *             self.FILTER = tmp             # <<<<<<<<<<<<<<
 *         tmp = self.FILTER + flt
 *         self.FILTER = tmp
 */
    __Pyx_INCREF(__pyx_v_tmp);
    __Pyx_GIVEREF(__pyx_v_tmp);
    __Pyx_GOTREF(__pyx_v_self->FILTER);
    __Pyx_DECREF(__pyx_v_self->FILTER);
    __pyx_v_self->FILTER = __pyx_v_tmp;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":461
 *             tmp = self.FILTER + ';'
 *             self.FILTER = tmp
 *         tmp = self.FILTER + flt             # <<<<<<<<<<<<<<
 *         self.FILTER = tmp
 * 
 */
  __pyx_t_2 = PyNumber_Add(__pyx_v_self->FILTER, __pyx_v_flt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_v_tmp);
  __pyx_v_tmp = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":462
 *             self.FILTER = tmp
 *         tmp = self.FILTER + flt
 *         self.FILTER = tmp             # <<<<<<<<<<<<<<
 * 
 *     def add_info(self, info, value=True):
 */
  __Pyx_INCREF(__pyx_v_tmp);
  __Pyx_GIVEREF(__pyx_v_tmp);
  __Pyx_GOTREF(__pyx_v_self->FILTER);
  __Pyx_DECREF(__pyx_v_self->FILTER);
  __pyx_v_self->FILTER = __pyx_v_tmp;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Record.add_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_27add_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_27add_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_info = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__info,&__pyx_n_s__value,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_40;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_info = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record.add_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_26add_info(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), __pyx_v_info, __pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":464
 *         self.FILTER = tmp
 * 
 *     def add_info(self, info, value=True):             # <<<<<<<<<<<<<<
 *         self.INFO[info] = value
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_26add_info(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_info, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_info", 0);

  /* "cyvcf/parser.pyx":465
 * 
 *     def add_info(self, info, value=True):
 *         self.INFO[info] = value             # <<<<<<<<<<<<<<
 * 
 *     def genotype(self, name):
 */
  if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (PyDict_SetItem(((PyObject *)__pyx_v_self->INFO), __pyx_v_info, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record.add_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_29genotype(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_28genotype[] = " Lookup a ``_Call`` for the sample given in ``name`` ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_29genotype(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genotype (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_28genotype(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_name));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":467
 *         self.INFO[info] = value
 * 
 *     def genotype(self, name):             # <<<<<<<<<<<<<<
 *         """ Lookup a ``_Call`` for the sample given in ``name`` """
 *         return self.samples[self._sample_indexes[name]]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_28genotype(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genotype", 0);

  /* "cyvcf/parser.pyx":469
 *     def genotype(self, name):
 *         """ Lookup a ``_Call`` for the sample given in ``name`` """
 *         return self.samples[self._sample_indexes[name]]             # <<<<<<<<<<<<<<
 * 
 *     ###############################################################
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (unlikely(((PyObject *)__pyx_v_self->_sample_indexes) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->_sample_indexes), __pyx_v_name); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_self->samples), __pyx_t_1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser._Record.genotype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_5CHROM_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_5CHROM_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_5CHROM___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":475
 *     ###############################################################
 *     property CHROM:
 *         def __get__(self): return self.CHROM             # <<<<<<<<<<<<<<
 * 
 *     property POS:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_5CHROM___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->CHROM));
  __pyx_r = ((PyObject *)__pyx_v_self->CHROM);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3POS_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3POS_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3POS___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":478
 * 
 *     property POS:
 *         def __get__(self): return self.POS             # <<<<<<<<<<<<<<
 * 
 *     property ID:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3POS___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->POS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.POS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_2ID_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_2ID_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_2ID___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":481
 * 
 *     property ID:
 *         def __get__(self): return self.ID             # <<<<<<<<<<<<<<
 * 
 *     property REF:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_2ID___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->ID));
  __pyx_r = ((PyObject *)__pyx_v_self->ID);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3REF_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3REF_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3REF___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":484
 * 
 *     property REF:
 *         def __get__(self): return self.REF             # <<<<<<<<<<<<<<
 * 
 *     property ALT:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3REF___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->REF));
  __pyx_r = ((PyObject *)__pyx_v_self->REF);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3ALT_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3ALT_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3ALT___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":487
 * 
 *     property ALT:
 *         def __get__(self): return self.ALT             # <<<<<<<<<<<<<<
 * 
 *     property QUAL:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3ALT___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->ALT));
  __pyx_r = ((PyObject *)__pyx_v_self->ALT);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_4QUAL_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_4QUAL_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_4QUAL___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":490
 * 
 *     property QUAL:
 *         def __get__(self): return self.QUAL             # <<<<<<<<<<<<<<
 * 
 *     property INFO:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4QUAL___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->QUAL);
  __pyx_r = __pyx_v_self->QUAL;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_4INFO_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_4INFO_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_4INFO___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":493
 * 
 *     property INFO:
 *         def __get__(self): return self.INFO             # <<<<<<<<<<<<<<
 * 
 *     property FILTER:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4INFO___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->INFO));
  __pyx_r = ((PyObject *)__pyx_v_self->INFO);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_6FILTER_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_6FILTER_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_6FILTER___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":496
 * 
 *     property FILTER:
 *         def __get__(self): return self.FILTER             # <<<<<<<<<<<<<<
 * 
 *     property FORMAT:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_6FILTER___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->FILTER);
  __pyx_r = __pyx_v_self->FILTER;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_6FORMAT_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_6FORMAT_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_6FORMAT___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":499
 * 
 *     property FORMAT:
 *         def __get__(self): return self.FORMAT             # <<<<<<<<<<<<<<
 * 
 *     ###############################################################
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_6FORMAT___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->FORMAT));
  __pyx_r = ((PyObject *)__pyx_v_self->FORMAT);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_5start_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_5start_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_5start___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":506
 *     property start:
 *         """The 0-based start coordinate for the variant."""
 *         def __get__(self): return self.start             # <<<<<<<<<<<<<<
 * 
 *     property end:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_5start___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.start.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3end_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_3end_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3end___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":510
 *     property end:
 *         """The 1-based end coordinate for the variant."""
 *         def __get__(self): return self.end             # <<<<<<<<<<<<<<
 * 
 *     property alleles:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3end___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.end.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7alleles_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7alleles_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7alleles___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":516
 *            [0] = REF, [1:] = ALTS
 *         """
 *         def __get__(self): return self.alleles             # <<<<<<<<<<<<<<
 * 
 *     property samples:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7alleles___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->alleles));
  __pyx_r = ((PyObject *)__pyx_v_self->alleles);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7samples_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7samples___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":520
 *     property samples:
 *         """A list of Call instances: one for each sample"""
 *         def __get__(self): return self.samples             # <<<<<<<<<<<<<<
 * 
 *     property gt_bases:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7samples___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->samples));
  __pyx_r = ((PyObject *)__pyx_v_self->samples);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":526
 *            E.g., ['A/G', 'A/A', 'G/G']
 *         """
 *         def __get__(self): return self.gt_bases             # <<<<<<<<<<<<<<
 * 
 *     property gt_types:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8gt_bases___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_bases));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_bases);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_8gt_types_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_8gt_types_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_types___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":536
 *            E.g., ['A/G', 'A/A', 'G/G']
 *         """
 *         def __get__(self): return self.gt_types             # <<<<<<<<<<<<<<
 * 
 *     property gt_phases:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8gt_types___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_types));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_types);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":543
 *            this would return [False, True, False]
 *         """
 *         def __get__(self): return self.gt_phases             # <<<<<<<<<<<<<<
 * 
 *     property gt_depths:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_9gt_phases___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_phases));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_phases);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":549
 *            each genotype.
 *         """
 *         def __get__(self): return self.gt_depths             # <<<<<<<<<<<<<<
 * 
 *     property gt_ref_depths:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_9gt_depths___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_depths));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_depths);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":555
 *            the reference allele for each sample.
 *         """
 *         def __get__(self): return self.gt_ref_depths             # <<<<<<<<<<<<<<
 * 
 *     property gt_alt_depths:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_ref_depths));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_ref_depths);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":561
 *            the alternate allele for each sample.
 *         """
 *         def __get__(self): return self.gt_alt_depths             # <<<<<<<<<<<<<<
 * 
 *     property gt_quals:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_alt_depths));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_alt_depths);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":567
 *            for each sample.
 *         """
 *         def __get__(self): return self.gt_quals             # <<<<<<<<<<<<<<
 * 
 *     property num_hom_ref:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_8gt_quals___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->gt_quals));
  __pyx_r = ((PyObject *)__pyx_v_self->gt_quals);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11num_hom_ref_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11num_hom_ref_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":571
 *     property num_hom_ref:
 *         """The number of homozygotes for the REF allele."""
 *         def __get__(self): return self.num_hom_ref             # <<<<<<<<<<<<<<
 * 
 *     property num_het:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_hom_ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.num_hom_ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7num_het_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_7num_het_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7num_het___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":575
 *     property num_het:
 *         """The number of heterozygotes."""
 *         def __get__(self): return self.num_het             # <<<<<<<<<<<<<<
 * 
 *     property num_hom_alt:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7num_het___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_het); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.num_het.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11num_hom_alt_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11num_hom_alt_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":579
 *     property num_hom_alt:
 *         """The number of homozygotes for an ALT allele."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.num_hom_alt
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":580
 *         """The number of homozygotes for an ALT allele."""
 *         def __get__(self):
 *             return self.num_hom_alt             # <<<<<<<<<<<<<<
 * 
 *     property num_unknown:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_hom_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.num_hom_alt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11num_unknown_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_11num_unknown_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_11num_unknown___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":584
 *     property num_unknown:
 *         """The number of unknown (e.g., ./.) genotypes."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.num_unknown
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_unknown___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":585
 *         """The number of unknown (e.g., ./.) genotypes."""
 *         def __get__(self):
 *             return self.num_unknown             # <<<<<<<<<<<<<<
 * 
 *     property num_called:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_unknown); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.num_unknown.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_10num_called_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_10num_called_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_10num_called___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":589
 *     property num_called:
 *         """The number of called (i.e., NOT ./.) genotypes."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.num_called
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_10num_called___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":590
 *         """The number of called (i.e., NOT ./.) genotypes."""
 *         def __get__(self):
 *             return self.num_called             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_called); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.num_called.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_31call_rate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_30call_rate[] = " The fraction of genotypes that were actually called. ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_31call_rate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("call_rate (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_30call_rate(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":593
 * 
 *     @property
 *     def call_rate(self):             # <<<<<<<<<<<<<<
 *         """ The fraction of genotypes that were actually called. """
 *         return float(self.num_called) / float(len(self.samples))
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_30call_rate(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("call_rate", 0);

  /* "cyvcf/parser.pyx":595
 *     def call_rate(self):
 *         """ The fraction of genotypes that were actually called. """
 *         return float(self.num_called) / float(len(self.samples))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->samples);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(((double)__pyx_t_2) == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyFloat_FromDouble((((double)__pyx_v_self->num_called) / ((double)__pyx_t_2))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.call_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_33aaf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_32aaf[] = " The allele frequency of the alternate allele.\n           NOTE 1: Punt if more than one alternate allele.\n           NOTE 2: Denominator calc'ed from _called_ genotypes.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_33aaf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("aaf (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_32aaf(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":598
 * 
 *     @property
 *     def aaf(self):             # <<<<<<<<<<<<<<
 *         """ The allele frequency of the alternate allele.
 *            NOTE 1: Punt if more than one alternate allele.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_32aaf(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  CYTHON_UNUSED int __pyx_v_hom_ref;
  PyObject *__pyx_v_het = NULL;
  PyObject *__pyx_v_hom_alt = NULL;
  double __pyx_v_num_chroms;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  double __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("aaf", 0);

  /* "cyvcf/parser.pyx":604
 *         """
 *         # skip if more than one alternate allele. assumes bi-allelic
 *         if len(self.ALT) > 1:             # <<<<<<<<<<<<<<
 *             return None
 *         hom_ref = self.num_hom_ref
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 > 1);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":605
 *         # skip if more than one alternate allele. assumes bi-allelic
 *         if len(self.ALT) > 1:
 *             return None             # <<<<<<<<<<<<<<
 *         hom_ref = self.num_hom_ref
 *         het = self.num_het
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":606
 *         if len(self.ALT) > 1:
 *             return None
 *         hom_ref = self.num_hom_ref             # <<<<<<<<<<<<<<
 *         het = self.num_het
 *         hom_alt = self.num_hom_alt
 */
  __pyx_t_4 = __pyx_v_self->num_hom_ref;
  __pyx_v_hom_ref = __pyx_t_4;

  /* "cyvcf/parser.pyx":607
 *             return None
 *         hom_ref = self.num_hom_ref
 *         het = self.num_het             # <<<<<<<<<<<<<<
 *         hom_alt = self.num_hom_alt
 *         num_chroms = float(2.0*self.num_called)
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_het); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_het = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":608
 *         hom_ref = self.num_hom_ref
 *         het = self.num_het
 *         hom_alt = self.num_hom_alt             # <<<<<<<<<<<<<<
 *         num_chroms = float(2.0*self.num_called)
 *         if num_chroms == 0.0:
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->num_hom_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_hom_alt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":609
 *         het = self.num_het
 *         hom_alt = self.num_hom_alt
 *         num_chroms = float(2.0*self.num_called)             # <<<<<<<<<<<<<<
 *         if num_chroms == 0.0:
 *             return 0.0
 */
  __pyx_v_num_chroms = (2.0 * __pyx_v_self->num_called);

  /* "cyvcf/parser.pyx":610
 *         hom_alt = self.num_hom_alt
 *         num_chroms = float(2.0*self.num_called)
 *         if num_chroms == 0.0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         else:
 */
  __pyx_t_3 = (__pyx_v_num_chroms == 0.0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":611
 *         num_chroms = float(2.0*self.num_called)
 *         if num_chroms == 0.0:
 *             return 0.0             # <<<<<<<<<<<<<<
 *         else:
 *             return float(het + 2*hom_alt)/float(num_chroms)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":613
 *             return 0.0
 *         else:
 *             return float(het + 2*hom_alt)/float(num_chroms)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyNumber_Multiply(__pyx_int_2, __pyx_v_hom_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyNumber_Add(__pyx_v_het, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_t_5); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v_num_chroms == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = PyFloat_FromDouble((__pyx_t_6 / __pyx_v_num_chroms)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record.aaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_het);
  __Pyx_XDECREF(__pyx_v_hom_alt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_35nucl_diversity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_34nucl_diversity[] = "\n        pi_hat (estimation of nucleotide diversity) for the site.\n        This metric can be summed across multiple sites to compute regional\n        nucleotide diversity estimates.  For example, pi_hat for all variants\n        in a given gene.\n\n        Derived from:\n        \"Population Genetics: A Concise Guide, 2nd ed., p.45\"\n          John Gillespie.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_35nucl_diversity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nucl_diversity (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_34nucl_diversity(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":616
 * 
 *     @property
 *     def nucl_diversity(self):             # <<<<<<<<<<<<<<
 *         """
 *         pi_hat (estimation of nucleotide diversity) for the site.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_34nucl_diversity(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_q = NULL;
  double __pyx_v_num_chroms;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nucl_diversity", 0);

  /* "cyvcf/parser.pyx":628
 *         """
 *         # skip if more than one alternate allele. assumes bi-allelic
 *         if len(self.ALT) > 1:             # <<<<<<<<<<<<<<
 *             return None
 *         p = self.aaf
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 > 1);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":629
 *         # skip if more than one alternate allele. assumes bi-allelic
 *         if len(self.ALT) > 1:
 *             return None             # <<<<<<<<<<<<<<
 *         p = self.aaf
 *         q = 1.0-p
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":630
 *         if len(self.ALT) > 1:
 *             return None
 *         p = self.aaf             # <<<<<<<<<<<<<<
 *         q = 1.0-p
 *         num_chroms = float(2.0*self.num_called)
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__aaf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":631
 *             return None
 *         p = self.aaf
 *         q = 1.0-p             # <<<<<<<<<<<<<<
 *         num_chroms = float(2.0*self.num_called)
 *         return float(num_chroms/(num_chroms-1.0)) * (2.0 * p * q)
 */
  __pyx_t_1 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_v_p); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_q = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":632
 *         p = self.aaf
 *         q = 1.0-p
 *         num_chroms = float(2.0*self.num_called)             # <<<<<<<<<<<<<<
 *         return float(num_chroms/(num_chroms-1.0)) * (2.0 * p * q)
 * 
 */
  __pyx_v_num_chroms = (2.0 * __pyx_v_self->num_called);

  /* "cyvcf/parser.pyx":633
 *         q = 1.0-p
 *         num_chroms = float(2.0*self.num_called)
 *         return float(num_chroms/(num_chroms-1.0)) * (2.0 * p * q)             # <<<<<<<<<<<<<<
 * 
 *     def get_hom_refs(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = (__pyx_v_num_chroms - 1.0);
  if (unlikely(__pyx_t_5 == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_num_chroms / __pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_p); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_6, __pyx_v_q); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cyvcf.parser._Record.nucl_diversity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_q);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_37get_hom_refs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_36get_hom_refs[] = " The list of hom ref genotypes";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_37get_hom_refs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_hom_refs (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_36get_hom_refs(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":635
 *         return float(num_chroms/(num_chroms-1.0)) * (2.0 * p * q)
 * 
 *     def get_hom_refs(self):             # <<<<<<<<<<<<<<
 *         """ The list of hom ref genotypes"""
 *         return [s for s in self.samples if s.gt_type == 0]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_36get_hom_refs(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_hom_refs", 0);

  /* "cyvcf/parser.pyx":637
 *     def get_hom_refs(self):
 *         """ The list of hom ref genotypes"""
 *         return [s for s in self.samples if s.gt_type == 0]             # <<<<<<<<<<<<<<
 * 
 *     def get_hom_alts(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_self->samples); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record.get_hom_refs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_39get_hom_alts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_38get_hom_alts[] = " The list of hom alt genotypes";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_39get_hom_alts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_hom_alts (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_38get_hom_alts(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":639
 *         return [s for s in self.samples if s.gt_type == 0]
 * 
 *     def get_hom_alts(self):             # <<<<<<<<<<<<<<
 *         """ The list of hom alt genotypes"""
 *         return [s for s in self.samples if s.gt_type == 3]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_38get_hom_alts(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_hom_alts", 0);

  /* "cyvcf/parser.pyx":641
 *     def get_hom_alts(self):
 *         """ The list of hom alt genotypes"""
 *         return [s for s in self.samples if s.gt_type == 3]             # <<<<<<<<<<<<<<
 * 
 *     def get_hets(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_self->samples); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record.get_hom_alts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_41get_hets(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_40get_hets[] = " The list of het genotypes";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_41get_hets(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_hets (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_40get_hets(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":643
 *         return [s for s in self.samples if s.gt_type == 3]
 * 
 *     def get_hets(self):             # <<<<<<<<<<<<<<
 *         """ The list of het genotypes"""
 *         return [s for s in self.samples if s.gt_type == 1]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_40get_hets(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_hets", 0);

  /* "cyvcf/parser.pyx":645
 *     def get_hets(self):
 *         """ The list of het genotypes"""
 *         return [s for s in self.samples if s.gt_type == 1]             # <<<<<<<<<<<<<<
 * 
 *     def get_unknowns(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_self->samples); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record.get_hets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_43get_unknowns(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_42get_unknowns[] = " The list of unknown genotypes";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_43get_unknowns(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_unknowns (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_42get_unknowns(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":647
 *         return [s for s in self.samples if s.gt_type == 1]
 * 
 *     def get_unknowns(self):             # <<<<<<<<<<<<<<
 *         """ The list of unknown genotypes"""
 *         return [s for s in self.samples if s.gt_type is None]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_42get_unknowns(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_unknowns", 0);

  /* "cyvcf/parser.pyx":649
 *     def get_unknowns(self):
 *         """ The list of unknown genotypes"""
 *         return [s for s in self.samples if s.gt_type is None]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_self->samples); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = (__pyx_t_4 == Py_None);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {
      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Record.get_unknowns", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_45is_snp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_44is_snp[] = " Return whether or not the variant is a SNP ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_45is_snp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_snp (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_44is_snp(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":652
 * 
 *     @property
 *     def is_snp(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is a SNP """
 *         if len(self.REF) > 1: return False
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_44is_snp(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_alt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_snp", 0);

  /* "cyvcf/parser.pyx":654
 *     def is_snp(self):
 *         """ Return whether or not the variant is a SNP """
 *         if len(self.REF) > 1: return False             # <<<<<<<<<<<<<<
 *         for alt in self.ALT:
 *             if alt not in ['A', 'C', 'G', 'T']:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->REF);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 > 1);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":655
 *         """ Return whether or not the variant is a SNP """
 *         if len(self.REF) > 1: return False
 *         for alt in self.ALT:             # <<<<<<<<<<<<<<
 *             if alt not in ['A', 'C', 'G', 'T']:
 *                 return False
 */
  if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_alt);
    __pyx_v_alt = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":656
 *         if len(self.REF) > 1: return False
 *         for alt in self.ALT:
 *             if alt not in ['A', 'C', 'G', 'T']:             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
    __Pyx_INCREF(__pyx_v_alt);
    __pyx_t_4 = __pyx_v_alt;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__A), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (((int)__pyx_t_3)) {
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__C), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = ((int)__pyx_t_6);
    } else {
      __pyx_t_7 = ((int)__pyx_t_3);
    }
    if (__pyx_t_7) {
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__G), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = ((int)__pyx_t_3);
    } else {
      __pyx_t_6 = __pyx_t_7;
    }
    if (__pyx_t_6) {
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__T), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = ((int)__pyx_t_7);
    } else {
      __pyx_t_3 = __pyx_t_6;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __pyx_t_3;
    if (__pyx_t_6) {

      /* "cyvcf/parser.pyx":657
 *         for alt in self.ALT:
 *             if alt not in ['A', 'C', 'G', 'T']:
 *                 return False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":658
 *             if alt not in ['A', 'C', 'G', 'T']:
 *                 return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_snp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_alt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_47is_indel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_46is_indel[] = " Return whether or not the variant is an INDEL ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_47is_indel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_indel (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_46is_indel(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":661
 * 
 *     @property
 *     def is_indel(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is an INDEL """
 *         is_sv = self.is_sv
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_46is_indel(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_is_sv = NULL;
  PyObject *__pyx_v_alt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_indel", 0);

  /* "cyvcf/parser.pyx":663
 *     def is_indel(self):
 *         """ Return whether or not the variant is an INDEL """
 *         is_sv = self.is_sv             # <<<<<<<<<<<<<<
 * 
 *         if len(self.REF) > 1 and not is_sv: return True
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_is_sv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":665
 *         is_sv = self.is_sv
 * 
 *         if len(self.REF) > 1 and not is_sv: return True             # <<<<<<<<<<<<<<
 *         for alt in self.ALT:
 *             if alt is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->REF);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 > 1);
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_sv); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = (!__pyx_t_4);
    __pyx_t_4 = __pyx_t_5;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":666
 * 
 *         if len(self.REF) > 1 and not is_sv: return True
 *         for alt in self.ALT:             # <<<<<<<<<<<<<<
 *             if alt is None:
 *                 return True
 */
  if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_alt);
    __pyx_v_alt = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cyvcf/parser.pyx":667
 *         if len(self.REF) > 1 and not is_sv: return True
 *         for alt in self.ALT:
 *             if alt is None:             # <<<<<<<<<<<<<<
 *                 return True
 *             elif len(alt) != len(self.REF):
 */
    __pyx_t_4 = (__pyx_v_alt == Py_None);
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":668
 *         for alt in self.ALT:
 *             if alt is None:
 *                 return True             # <<<<<<<<<<<<<<
 *             elif len(alt) != len(self.REF):
 *                 # the diff. b/w INDELs and SVs can be murky.
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }

    /* "cyvcf/parser.pyx":669
 *             if alt is None:
 *                 return True
 *             elif len(alt) != len(self.REF):             # <<<<<<<<<<<<<<
 *                 # the diff. b/w INDELs and SVs can be murky.
 *                 if not is_sv:
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyObject *)__pyx_v_self->REF);
    __Pyx_INCREF(__pyx_t_6);
    if (unlikely(__pyx_t_6 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_4 = (__pyx_t_7 != __pyx_t_8);
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":671
 *             elif len(alt) != len(self.REF):
 *                 # the diff. b/w INDELs and SVs can be murky.
 *                 if not is_sv:             # <<<<<<<<<<<<<<
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	AC=10;
 *                     return True
 */
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_sv); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = (!__pyx_t_4);
      if (__pyx_t_3) {

        /* "cyvcf/parser.pyx":673
 *                 if not is_sv:
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	AC=10;
 *                     return True             # <<<<<<<<<<<<<<
 *                 else:
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	SVTYPE=DEL;
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":676
 *                 else:
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	SVTYPE=DEL;
 *                     return False             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      __pyx_L7:;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":677
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	SVTYPE=DEL;
 *                     return False
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_indel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_is_sv);
  __Pyx_XDECREF(__pyx_v_alt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_49is_sv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_48is_sv[] = " Return whether or not the variant is a structural variant ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_49is_sv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_sv (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_48is_sv(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":680
 * 
 *     @property
 *     def is_sv(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is a structural variant """
 *         if self.INFO.get('SVTYPE') is None:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_48is_sv(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sv", 0);

  /* "cyvcf/parser.pyx":682
 *     def is_sv(self):
 *         """ Return whether or not the variant is a structural variant """
 *         if self.INFO.get('SVTYPE') is None:             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
  if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__SVTYPE), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":683
 *         """ Return whether or not the variant is a structural variant """
 *         if self.INFO.get('SVTYPE') is None:
 *             return False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":684
 *         if self.INFO.get('SVTYPE') is None:
 *             return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_sv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_51is_transition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_50is_transition[] = " Return whether or not the SNP is a transition ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_51is_transition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_transition (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_50is_transition(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":687
 * 
 *     @property
 *     def is_transition(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the SNP is a transition """
 *         # if multiple alts, it is unclear if we have a transition
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_50is_transition(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_alt_allele = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_transition", 0);

  /* "cyvcf/parser.pyx":690
 *         """ Return whether or not the SNP is a transition """
 *         # if multiple alts, it is unclear if we have a transition
 *         if len(self.ALT) > 1: return False             # <<<<<<<<<<<<<<
 * 
 *         if self.is_snp:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 > 1);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":692
 *         if len(self.ALT) > 1: return False
 * 
 *         if self.is_snp:             # <<<<<<<<<<<<<<
 *             # just one alt allele
 *             alt_allele = self.ALT[0]
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_snp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":694
 *         if self.is_snp:
 *             # just one alt allele
 *             alt_allele = self.ALT[0]             # <<<<<<<<<<<<<<
 *             if ((self.REF == b'A' and alt_allele == b'G') or
 *                 (self.REF == b'G' and alt_allele == b'A') or
 */
    if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->ALT), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_alt_allele = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":695
 *             # just one alt allele
 *             alt_allele = self.ALT[0]
 *             if ((self.REF == b'A' and alt_allele == b'G') or             # <<<<<<<<<<<<<<
 *                 (self.REF == b'G' and alt_allele == b'A') or
 *                 (self.REF == b'C' and alt_allele == b'T') or
 */
    __pyx_t_3 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_v_self->REF), ((PyObject *)__pyx_n_b__A), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt_allele, ((PyObject *)__pyx_n_b__G), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (!__pyx_t_5) {

      /* "cyvcf/parser.pyx":696
 *             alt_allele = self.ALT[0]
 *             if ((self.REF == b'A' and alt_allele == b'G') or
 *                 (self.REF == b'G' and alt_allele == b'A') or             # <<<<<<<<<<<<<<
 *                 (self.REF == b'C' and alt_allele == b'T') or
 *                 (self.REF == b'T' and alt_allele == b'C')):
 */
      __pyx_t_3 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_v_self->REF), ((PyObject *)__pyx_n_b__G), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_3) {
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt_allele, ((PyObject *)__pyx_n_b__A), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __pyx_t_4;
      } else {
        __pyx_t_6 = __pyx_t_3;
      }
      if (!__pyx_t_6) {

        /* "cyvcf/parser.pyx":697
 *             if ((self.REF == b'A' and alt_allele == b'G') or
 *                 (self.REF == b'G' and alt_allele == b'A') or
 *                 (self.REF == b'C' and alt_allele == b'T') or             # <<<<<<<<<<<<<<
 *                 (self.REF == b'T' and alt_allele == b'C')):
 *                 return True
 */
        __pyx_t_3 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_v_self->REF), ((PyObject *)__pyx_n_b__C), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_3) {
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt_allele, ((PyObject *)__pyx_n_b__T), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_7 = __pyx_t_4;
        } else {
          __pyx_t_7 = __pyx_t_3;
        }
        if (!__pyx_t_7) {

          /* "cyvcf/parser.pyx":698
 *                 (self.REF == b'G' and alt_allele == b'A') or
 *                 (self.REF == b'C' and alt_allele == b'T') or
 *                 (self.REF == b'T' and alt_allele == b'C')):             # <<<<<<<<<<<<<<
 *                 return True
 *             else: return False
 */
          __pyx_t_3 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_v_self->REF), ((PyObject *)__pyx_n_b__T), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_3) {
            __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt_allele, ((PyObject *)__pyx_n_b__C), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_8 = __pyx_t_4;
          } else {
            __pyx_t_8 = __pyx_t_3;
          }
          __pyx_t_3 = __pyx_t_8;
        } else {
          __pyx_t_3 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    if (__pyx_t_6) {

      /* "cyvcf/parser.pyx":699
 *                 (self.REF == b'C' and alt_allele == b'T') or
 *                 (self.REF == b'T' and alt_allele == b'C')):
 *                 return True             # <<<<<<<<<<<<<<
 *             else: return False
 *         else: return False
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":700
 *                 (self.REF == b'T' and alt_allele == b'C')):
 *                 return True
 *             else: return False             # <<<<<<<<<<<<<<
 *         else: return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":701
 *                 return True
 *             else: return False
 *         else: return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_transition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_alt_allele);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_53is_deletion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_52is_deletion[] = " Return whether or not the INDEL is a deletion ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_53is_deletion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_deletion (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_52is_deletion(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":704
 * 
 *     @property
 *     def is_deletion(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the INDEL is a deletion """
 *         # if multiple alts, it is unclear if we have a transition
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_52is_deletion(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_v_alt_allele = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_deletion", 0);

  /* "cyvcf/parser.pyx":707
 *         """ Return whether or not the INDEL is a deletion """
 *         # if multiple alts, it is unclear if we have a transition
 *         if len(self.ALT) > 1: return False             # <<<<<<<<<<<<<<
 * 
 *         if self.is_indel:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 > 1);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":709
 *         if len(self.ALT) > 1: return False
 * 
 *         if self.is_indel:             # <<<<<<<<<<<<<<
 *             # just one alt allele
 *             alt_allele = self.ALT[0]
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":711
 *         if self.is_indel:
 *             # just one alt allele
 *             alt_allele = self.ALT[0]             # <<<<<<<<<<<<<<
 *             if alt_allele is None:
 *                 return True
 */
    if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->ALT), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_alt_allele = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":712
 *             # just one alt allele
 *             alt_allele = self.ALT[0]
 *             if alt_allele is None:             # <<<<<<<<<<<<<<
 *                 return True
 *             if len(self.REF) > len(alt_allele):
 */
    __pyx_t_3 = (__pyx_v_alt_allele == Py_None);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":713
 *             alt_allele = self.ALT[0]
 *             if alt_allele is None:
 *                 return True             # <<<<<<<<<<<<<<
 *             if len(self.REF) > len(alt_allele):
 *                 return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "cyvcf/parser.pyx":714
 *             if alt_allele is None:
 *                 return True
 *             if len(self.REF) > len(alt_allele):             # <<<<<<<<<<<<<<
 *                 return True
 *             else: return False
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->REF);
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = PyObject_Length(__pyx_v_alt_allele); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = (__pyx_t_2 > __pyx_t_4);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":715
 *                 return True
 *             if len(self.REF) > len(alt_allele):
 *                 return True             # <<<<<<<<<<<<<<
 *             else: return False
 *         else: return False
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":716
 *             if len(self.REF) > len(alt_allele):
 *                 return True
 *             else: return False             # <<<<<<<<<<<<<<
 *         else: return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __pyx_L6:;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":717
 *                 return True
 *             else: return False
 *         else: return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_deletion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_alt_allele);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_55var_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_54var_type[] = "\n        Return the type of variant [snp, indel, unknown]\n        TO DO: support SVs\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_55var_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("var_type (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_54var_type(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":720
 * 
 *     @property
 *     def var_type(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the type of variant [snp, indel, unknown]
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_54var_type(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("var_type", 0);

  /* "cyvcf/parser.pyx":725
 *         TO DO: support SVs
 *         """
 *         if self.is_snp:             # <<<<<<<<<<<<<<
 *             return "snp"
 *         elif self.is_indel:
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_snp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":726
 *         """
 *         if self.is_snp:
 *             return "snp"             # <<<<<<<<<<<<<<
 *         elif self.is_indel:
 *             return "indel"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__snp));
    __pyx_r = ((PyObject *)__pyx_n_s__snp);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":727
 *         if self.is_snp:
 *             return "snp"
 *         elif self.is_indel:             # <<<<<<<<<<<<<<
 *             return "indel"
 *         elif self.is_sv:
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":728
 *             return "snp"
 *         elif self.is_indel:
 *             return "indel"             # <<<<<<<<<<<<<<
 *         elif self.is_sv:
 *             return "sv"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__indel));
    __pyx_r = ((PyObject *)__pyx_n_s__indel);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":729
 *         elif self.is_indel:
 *             return "indel"
 *         elif self.is_sv:             # <<<<<<<<<<<<<<
 *             return "sv"
 *         else:
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":730
 *             return "indel"
 *         elif self.is_sv:
 *             return "sv"             # <<<<<<<<<<<<<<
 *         else:
 *             return "unknown"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__sv));
    __pyx_r = ((PyObject *)__pyx_n_s__sv);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":732
 *             return "sv"
 *         else:
 *             return "unknown"             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__unknown));
    __pyx_r = ((PyObject *)__pyx_n_s__unknown);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.var_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_57var_subtype(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_56var_subtype[] = "\n        Return the subtype of variant.\n        - For SNPs and INDELs, yeild one of: [ts, tv, ins, del]\n        - For SVs yield either \"complex\" or the SV type defined\n          in the ALT fields (removing the brackets).\n          E.g.:\n               <DEL>       -> DEL\n               <INS:ME:L1> -> INS:ME:L1\n               <DUP>       -> DUP\n        \n        The logic is meant to follow the rules outlined in the following\n        paragraph at:\n        \n        http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41\n        \n        \"For precisely known variants, the REF and ALT fields should contain \n        the full sequences for the alleles, following the usual VCF conventions. \n        For imprecise variants, the REF field may contain a single base and the \n        ALT fields should contain symbolic alleles (e.g. <ID>), described in more \n        detail below. Imprecise variants should also be marked by the presence \n        of an IMPRECISE flag in the INFO field.\"\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_57var_subtype(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("var_subtype (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_56var_subtype(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":735
 * 
 *     @property
 *     def var_subtype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the subtype of variant.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_56var_subtype(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("var_subtype", 0);

  /* "cyvcf/parser.pyx":758
 *         of an IMPRECISE flag in the INFO field."
 *         """
 *         if self.is_snp:             # <<<<<<<<<<<<<<
 *             if self.is_transition:
 *                 return "ts"
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_snp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":759
 *         """
 *         if self.is_snp:
 *             if self.is_transition:             # <<<<<<<<<<<<<<
 *                 return "ts"
 *             elif len(self.ALT) == 1:
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_transition); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":760
 *         if self.is_snp:
 *             if self.is_transition:
 *                 return "ts"             # <<<<<<<<<<<<<<
 *             elif len(self.ALT) == 1:
 *                 return "tv"
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
      __pyx_r = ((PyObject *)__pyx_n_s__ts);
      goto __pyx_L0;
      goto __pyx_L4;
    }

    /* "cyvcf/parser.pyx":761
 *             if self.is_transition:
 *                 return "ts"
 *             elif len(self.ALT) == 1:             # <<<<<<<<<<<<<<
 *                 return "tv"
 *             else: # multiple ALT alleles.  unclear
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_t_3 == 1);
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":762
 *                 return "ts"
 *             elif len(self.ALT) == 1:
 *                 return "tv"             # <<<<<<<<<<<<<<
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__tv));
      __pyx_r = ((PyObject *)__pyx_n_s__tv);
      goto __pyx_L0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":764
 *                 return "tv"
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"             # <<<<<<<<<<<<<<
 *         elif self.is_indel:
 *             if self.is_deletion:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__unknown));
      __pyx_r = ((PyObject *)__pyx_n_s__unknown);
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":765
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"
 *         elif self.is_indel:             # <<<<<<<<<<<<<<
 *             if self.is_deletion:
 *                 return "del"
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":766
 *                 return "unknown"
 *         elif self.is_indel:
 *             if self.is_deletion:             # <<<<<<<<<<<<<<
 *                 return "del"
 *             elif len(self.ALT) == 1:
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_deletion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":767
 *         elif self.is_indel:
 *             if self.is_deletion:
 *                 return "del"             # <<<<<<<<<<<<<<
 *             elif len(self.ALT) == 1:
 *                 return "ins"
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__del));
      __pyx_r = ((PyObject *)__pyx_n_s__del);
      goto __pyx_L0;
      goto __pyx_L5;
    }

    /* "cyvcf/parser.pyx":768
 *             if self.is_deletion:
 *                 return "del"
 *             elif len(self.ALT) == 1:             # <<<<<<<<<<<<<<
 *                 return "ins"
 *             else: # multiple ALT alleles.  unclear
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_t_3 == 1);
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":769
 *                 return "del"
 *             elif len(self.ALT) == 1:
 *                 return "ins"             # <<<<<<<<<<<<<<
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__ins));
      __pyx_r = ((PyObject *)__pyx_n_s__ins);
      goto __pyx_L0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":771
 *                 return "ins"
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"             # <<<<<<<<<<<<<<
 *         elif self.is_sv:
 *             if self.INFO['SVTYPE'] == "BND":
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__unknown));
      __pyx_r = ((PyObject *)__pyx_n_s__unknown);
      goto __pyx_L0;
    }
    __pyx_L5:;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":772
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"
 *         elif self.is_sv:             # <<<<<<<<<<<<<<
 *             if self.INFO['SVTYPE'] == "BND":
 *                 return "complex"
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":773
 *                 return "unknown"
 *         elif self.is_sv:
 *             if self.INFO['SVTYPE'] == "BND":             # <<<<<<<<<<<<<<
 *                 return "complex"
 *             elif self.is_sv_precise:
 */
    if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__SVTYPE)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__BND), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":774
 *         elif self.is_sv:
 *             if self.INFO['SVTYPE'] == "BND":
 *                 return "complex"             # <<<<<<<<<<<<<<
 *             elif self.is_sv_precise:
 *                 return self.INFO['SVTYPE']
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__complex));
      __pyx_r = ((PyObject *)__pyx_n_s__complex);
      goto __pyx_L0;
      goto __pyx_L6;
    }

    /* "cyvcf/parser.pyx":775
 *             if self.INFO['SVTYPE'] == "BND":
 *                 return "complex"
 *             elif self.is_sv_precise:             # <<<<<<<<<<<<<<
 *                 return self.INFO['SVTYPE']
 *             else:
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv_precise); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":776
 *                 return "complex"
 *             elif self.is_sv_precise:
 *                 return self.INFO['SVTYPE']             # <<<<<<<<<<<<<<
 *             else:
 *                 # first remove both "<" and ">" from ALT
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__SVTYPE)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":779
 *             else:
 *                 # first remove both "<" and ">" from ALT
 *                 return self.ALT[0].strip('<>')             # <<<<<<<<<<<<<<
 *         else:
 *             return "unknown"
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->ALT), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }
    __pyx_L6:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":781
 *                 return self.ALT[0].strip('<>')
 *         else:
 *             return "unknown"             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__unknown));
    __pyx_r = ((PyObject *)__pyx_n_s__unknown);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser._Record.var_subtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_59sv_end(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_58sv_end[] = " Return the end position for the SV ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_59sv_end(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sv_end (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_58sv_end(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":784
 * 
 *     @property
 *     def sv_end(self):             # <<<<<<<<<<<<<<
 *         """ Return the end position for the SV """
 *         if self.is_sv:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_58sv_end(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sv_end", 0);

  /* "cyvcf/parser.pyx":786
 *     def sv_end(self):
 *         """ Return the end position for the SV """
 *         if self.is_sv:             # <<<<<<<<<<<<<<
 *             return self.INFO['END']
 *         return None
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":787
 *         """ Return the end position for the SV """
 *         if self.is_sv:
 *             return self.INFO['END']             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__END)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":788
 *         if self.is_sv:
 *             return self.INFO['END']
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.sv_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_61is_sv_precise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_60is_sv_precise[] = " Return whether the SV cordinates are mapped \n            to 1 b.p. resolution.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_61is_sv_precise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_sv_precise (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_60is_sv_precise(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":791
 * 
 *     @property
 *     def is_sv_precise(self):             # <<<<<<<<<<<<<<
 *         """ Return whether the SV cordinates are mapped
 *             to 1 b.p. resolution.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_60is_sv_precise(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sv_precise", 0);

  /* "cyvcf/parser.pyx":795
 *             to 1 b.p. resolution.
 *         """
 *         if self.INFO.get('IMPRECISE') is None and not self.is_sv:             # <<<<<<<<<<<<<<
 *             return False
 *         elif self.INFO.get('IMPRECISE') is not None and self.is_sv:
 */
  if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__IMPRECISE), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (!__pyx_t_3);
    __pyx_t_3 = __pyx_t_4;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":796
 *         """
 *         if self.INFO.get('IMPRECISE') is None and not self.is_sv:
 *             return False             # <<<<<<<<<<<<<<
 *         elif self.INFO.get('IMPRECISE') is not None and self.is_sv:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":797
 *         if self.INFO.get('IMPRECISE') is None and not self.is_sv:
 *             return False
 *         elif self.INFO.get('IMPRECISE') is not None and self.is_sv:             # <<<<<<<<<<<<<<
 *             return False
 *         elif self.INFO.get('IMPRECISE') is None and self.is_sv:
 */
  if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__IMPRECISE), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":798
 *             return False
 *         elif self.INFO.get('IMPRECISE') is not None and self.is_sv:
 *             return False             # <<<<<<<<<<<<<<
 *         elif self.INFO.get('IMPRECISE') is None and self.is_sv:
 *             return True
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "cyvcf/parser.pyx":799
 *         elif self.INFO.get('IMPRECISE') is not None and self.is_sv:
 *             return False
 *         elif self.INFO.get('IMPRECISE') is None and self.is_sv:             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_self->INFO) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->INFO), ((PyObject *)__pyx_n_s__IMPRECISE), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_3;
  } else {
    __pyx_t_2 = __pyx_t_4;
  }
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":800
 *             return False
 *         elif self.INFO.get('IMPRECISE') is None and self.is_sv:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_sv_precise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_63is_monomorphic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_7_Record_62is_monomorphic[] = " Return True for reference calls ";
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_63is_monomorphic(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_monomorphic (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_62is_monomorphic(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":803
 * 
 *     @property
 *     def is_monomorphic(self):             # <<<<<<<<<<<<<<
 *         """ Return True for reference calls """
 *         return len(self.ALT) == 1 and self.ALT[0] is None
 */

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_62is_monomorphic(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monomorphic", 0);

  /* "cyvcf/parser.pyx":805
 *     def is_monomorphic(self):
 *         """ Return True for reference calls """
 *         return len(self.ALT) == 1 and self.ALT[0] is None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->ALT);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == 1);
  if (__pyx_t_3) {
    if (unlikely(((PyObject *)__pyx_v_self->ALT) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->ALT), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (__pyx_t_1 == Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cyvcf.parser._Record.is_monomorphic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader___init__[] = " Create a new Reader for a VCF file.\n\n            You must specify a filename.  Gzipped streams\n            or files are attempted to be recogized by the file extension, or gzipped\n            can be forced with ``compressed=True``\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5cyvcf_6parser_6Reader___init__;
#endif
static int __pyx_pw_5cyvcf_6parser_6Reader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fsock = 0;
  PyObject *__pyx_v_filename = 0;
  int __pyx_v_compressed;
  int __pyx_v_prepend_chr;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fsock,&__pyx_n_s__filename,&__pyx_n_s__compressed,&__pyx_n_s__prepend_chr,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cyvcf/parser.pyx":822
 *     cdef _Record curr_record
 * 
 *     def __init__(self, fsock=None, filename=None,             # <<<<<<<<<<<<<<
 *                         bint compressed=False, bint prepend_chr=False):
 *         """ Create a new Reader for a VCF file.
 */
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fsock);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__compressed);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__prepend_chr);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fsock = values[0];
    __pyx_v_filename = values[1];
    if (values[2]) {
      __pyx_v_compressed = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_compressed == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "cyvcf/parser.pyx":823
 * 
 *     def __init__(self, fsock=None, filename=None,
 *                         bint compressed=False, bint prepend_chr=False):             # <<<<<<<<<<<<<<
 *         """ Create a new Reader for a VCF file.
 * 
 */
      __pyx_v_compressed = ((int)0);
    }
    if (values[3]) {
      __pyx_v_prepend_chr = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_prepend_chr == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_prepend_chr = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader___init__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_fsock, __pyx_v_filename, __pyx_v_compressed, __pyx_v_prepend_chr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":822
 *     cdef _Record curr_record
 * 
 *     def __init__(self, fsock=None, filename=None,             # <<<<<<<<<<<<<<
 *                         bint compressed=False, bint prepend_chr=False):
 *         """ Create a new Reader for a VCF file.
 */

static int __pyx_pf_5cyvcf_6parser_6Reader___init__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_fsock, PyObject *__pyx_v_filename, int __pyx_v_compressed, int __pyx_v_prepend_chr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_filename);

  /* "cyvcf/parser.pyx":830
 *             can be forced with ``compressed=True``
 *         """
 *         super(VCFReader, self).__init__()             # <<<<<<<<<<<<<<
 * 
 *         if not (fsock or filename):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VCFReader); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":832
 *         super(VCFReader, self).__init__()
 * 
 *         if not (fsock or filename):             # <<<<<<<<<<<<<<
 *             raise Exception('You must provide at least fsock or filename')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_fsock); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  __pyx_t_3 = (!__pyx_t_5);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":833
 * 
 *         if not (fsock or filename):
 *             raise Exception('You must provide at least fsock or filename')             # <<<<<<<<<<<<<<
 * 
 *         if filename:
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":835
 *             raise Exception('You must provide at least fsock or filename')
 * 
 *         if filename:             # <<<<<<<<<<<<<<
 *             self.filename = filename
 *             if fsock is None:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":836
 * 
 *         if filename:
 *             self.filename = filename             # <<<<<<<<<<<<<<
 *             if fsock is None:
 *                 self.reader = file(filename)
 */
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __Pyx_GOTREF(__pyx_v_self->filename);
    __Pyx_DECREF(__pyx_v_self->filename);
    __pyx_v_self->filename = __pyx_v_filename;

    /* "cyvcf/parser.pyx":837
 *         if filename:
 *             self.filename = filename
 *             if fsock is None:             # <<<<<<<<<<<<<<
 *                 self.reader = file(filename)
 * 
 */
    __pyx_t_3 = (__pyx_v_fsock == Py_None);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":838
 *             self.filename = filename
 *             if fsock is None:
 *                 self.reader = file(filename)             # <<<<<<<<<<<<<<
 * 
 *         if fsock:
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_2 = PyObject_Call(__pyx_builtin_file, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->reader);
      __Pyx_DECREF(__pyx_v_self->reader);
      __pyx_v_self->reader = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "cyvcf/parser.pyx":840
 *                 self.reader = file(filename)
 * 
 *         if fsock:             # <<<<<<<<<<<<<<
 *             self.reader = fsock
 *             if filename is None:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_fsock); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":841
 * 
 *         if fsock:
 *             self.reader = fsock             # <<<<<<<<<<<<<<
 *             if filename is None:
 *                 if hasattr(fsock, 'name'):
 */
    __Pyx_INCREF(__pyx_v_fsock);
    __Pyx_GIVEREF(__pyx_v_fsock);
    __Pyx_GOTREF(__pyx_v_self->reader);
    __Pyx_DECREF(__pyx_v_self->reader);
    __pyx_v_self->reader = __pyx_v_fsock;

    /* "cyvcf/parser.pyx":842
 *         if fsock:
 *             self.reader = fsock
 *             if filename is None:             # <<<<<<<<<<<<<<
 *                 if hasattr(fsock, 'name'):
 *                     filename = fsock.name
 */
    __pyx_t_3 = (__pyx_v_filename == Py_None);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":843
 *             self.reader = fsock
 *             if filename is None:
 *                 if hasattr(fsock, 'name'):             # <<<<<<<<<<<<<<
 *                     filename = fsock.name
 *             self.filename = filename
 */
      __pyx_t_3 = PyObject_HasAttr(__pyx_v_fsock, ((PyObject *)__pyx_n_s__name)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_3) {

        /* "cyvcf/parser.pyx":844
 *             if filename is None:
 *                 if hasattr(fsock, 'name'):
 *                     filename = fsock.name             # <<<<<<<<<<<<<<
 *             self.filename = filename
 * 
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_fsock, __pyx_n_s__name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_v_filename);
        __pyx_v_filename = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L8;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "cyvcf/parser.pyx":845
 *                 if hasattr(fsock, 'name'):
 *                     filename = fsock.name
 *             self.filename = filename             # <<<<<<<<<<<<<<
 * 
 *         if compressed or (filename and filename.endswith('.gz')):
 */
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __Pyx_GOTREF(__pyx_v_self->filename);
    __Pyx_DECREF(__pyx_v_self->filename);
    __pyx_v_self->filename = __pyx_v_filename;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "cyvcf/parser.pyx":847
 *             self.filename = filename
 * 
 *         if compressed or (filename and filename.endswith('.gz')):             # <<<<<<<<<<<<<<
 *             self.reader = gzip.GzipFile(fileobj=self.reader)
 * 
 */
  __pyx_t_3 = __pyx_v_compressed;
  if (!__pyx_t_3) {
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __pyx_t_4;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":848
 * 
 *         if compressed or (filename and filename.endswith('.gz')):
 *             self.reader = gzip.GzipFile(fileobj=self.reader)             # <<<<<<<<<<<<<<
 * 
 *         #: metadata fields from header
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__gzip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__GzipFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__fileobj), __pyx_v_self->reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->reader);
    __Pyx_DECREF(__pyx_v_self->reader);
    __pyx_v_self->reader = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "cyvcf/parser.pyx":851
 * 
 *         #: metadata fields from header
 *         self.metadata = {}             # <<<<<<<<<<<<<<
 *         #: INFO fields from header
 *         self.infos = {}
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->metadata));
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":853
 *         self.metadata = {}
 *         #: INFO fields from header
 *         self.infos = {}             # <<<<<<<<<<<<<<
 *         #: FILTER fields from header
 *         self.filters = {}
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->infos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->infos));
  __pyx_v_self->infos = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":855
 *         self.infos = {}
 *         #: FILTER fields from header
 *         self.filters = {}             # <<<<<<<<<<<<<<
 *         #: FORMAT fields from header
 *         self.formats = {}
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->filters);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->filters));
  __pyx_v_self->filters = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":857
 *         self.filters = {}
 *         #: FORMAT fields from header
 *         self.formats = {}             # <<<<<<<<<<<<<<
 *         self.samples = []
 *         self._sample_indexes = {}
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->formats));
  __pyx_v_self->formats = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":858
 *         #: FORMAT fields from header
 *         self.formats = {}
 *         self.samples = []             # <<<<<<<<<<<<<<
 *         self._sample_indexes = {}
 *         self._header_lines = []
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->samples));
  __pyx_v_self->samples = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":859
 *         self.formats = {}
 *         self.samples = []
 *         self._sample_indexes = {}             # <<<<<<<<<<<<<<
 *         self._header_lines = []
 *         self._col_defn_line = None
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_sample_indexes));
  __pyx_v_self->_sample_indexes = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":860
 *         self.samples = []
 *         self._sample_indexes = {}
 *         self._header_lines = []             # <<<<<<<<<<<<<<
 *         self._col_defn_line = None
 *         self._tabix = None
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __Pyx_GOTREF(__pyx_v_self->_header_lines);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_header_lines));
  __pyx_v_self->_header_lines = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":861
 *         self._sample_indexes = {}
 *         self._header_lines = []
 *         self._col_defn_line = None             # <<<<<<<<<<<<<<
 *         self._tabix = None
 *         self._prepend_chr = prepend_chr
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_col_defn_line);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_col_defn_line));
  __pyx_v_self->_col_defn_line = ((PyObject*)Py_None);

  /* "cyvcf/parser.pyx":862
 *         self._header_lines = []
 *         self._col_defn_line = None
 *         self._tabix = None             # <<<<<<<<<<<<<<
 *         self._prepend_chr = prepend_chr
 *         self._parse_metainfo()
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_tabix);
  __Pyx_DECREF(__pyx_v_self->_tabix);
  __pyx_v_self->_tabix = Py_None;

  /* "cyvcf/parser.pyx":863
 *         self._col_defn_line = None
 *         self._tabix = None
 *         self._prepend_chr = prepend_chr             # <<<<<<<<<<<<<<
 *         self._parse_metainfo()
 * 
 */
  __pyx_v_self->_prepend_chr = __pyx_v_prepend_chr;

  /* "cyvcf/parser.pyx":864
 *         self._tabix = None
 *         self._prepend_chr = prepend_chr
 *         self._parse_metainfo()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parse_metainfo); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cyvcf.parser.Reader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_2__iter__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":866
 *         self._parse_metainfo()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_2__iter__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cyvcf/parser.pyx":867
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def seek(self, offset):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_5seek(PyObject *__pyx_v_self, PyObject *__pyx_v_offset); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_5seek(PyObject *__pyx_v_self, PyObject *__pyx_v_offset) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("seek (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_4seek(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_offset));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":869
 *         return self
 * 
 *     def seek(self, offset):             # <<<<<<<<<<<<<<
 *         self.reader.seek(offset)
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_4seek(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("seek", 0);

  /* "cyvcf/parser.pyx":870
 * 
 *     def seek(self, offset):
 *         self.reader.seek(offset)             # <<<<<<<<<<<<<<
 * 
 *     def tell(self):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->reader, __pyx_n_s__seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_offset);
  __Pyx_GIVEREF(__pyx_v_offset);
  __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 = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser.Reader.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tell (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_6tell(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":872
 *         self.reader.seek(offset)
 * 
 *     def tell(self):             # <<<<<<<<<<<<<<
 *         return self.reader.tell()
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_6tell(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tell", 0);

  /* "cyvcf/parser.pyx":873
 * 
 *     def tell(self):
 *         return self.reader.tell()             # <<<<<<<<<<<<<<
 * 
 *     property filename:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->reader, __pyx_n_s__tell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cyvcf.parser.Reader.tell", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_8filename_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8filename___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":877
 *     property filename:
 *         """The name of the VCF file that the Reader is reading."""
 *         def __get__(self): return self.filename             # <<<<<<<<<<<<<<
 * 
 *     property samples:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_8filename___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->filename);
  __pyx_r = __pyx_v_self->filename;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7samples_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7samples___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":881
 *     property samples:
 *         """A list of the samples in this VCF file."""
 *         def __get__(self): return self.samples             # <<<<<<<<<<<<<<
 * 
 *     property formats:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_7samples___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->samples));
  __pyx_r = ((PyObject *)__pyx_v_self->samples);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7formats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7formats_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7formats___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":885
 *     property formats:
 *         """A dict of FORMATS defined in this VCF file."""
 *         def __get__(self): return self.formats             # <<<<<<<<<<<<<<
 * 
 *     property infos:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_7formats___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->formats));
  __pyx_r = ((PyObject *)__pyx_v_self->formats);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_5infos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_5infos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_5infos___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":889
 *     property infos:
 *         """A dict of INFO attrs defined in this VCF file."""
 *         def __get__(self): return self.infos             # <<<<<<<<<<<<<<
 * 
 *     property filters:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_5infos___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->infos));
  __pyx_r = ((PyObject *)__pyx_v_self->infos);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7filters_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_7filters_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7filters___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":893
 *     property filters:
 *         """A dict of FILTER attrs defined in this VCF file."""
 *         def __get__(self): return self.filters             # <<<<<<<<<<<<<<
 * 
 *     property metadata:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_7filters___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->filters));
  __pyx_r = ((PyObject *)__pyx_v_self->filters);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_8metadata_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8metadata___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":897
 *     property metadata:
 *         """?"""
 *         def __get__(self): return self.metadata             # <<<<<<<<<<<<<<
 * 
 *     property raw_header:
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_8metadata___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->metadata));
  __pyx_r = ((PyObject *)__pyx_v_self->metadata);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_10raw_header_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_10raw_header_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_10raw_header___get__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":901
 *     property raw_header:
 *         """Dump the raw, unparsed header lines"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return ''.join(self._header_lines)
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_10raw_header___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":902
 *         """Dump the raw, unparsed header lines"""
 *         def __get__(self):
 *             return ''.join(self._header_lines)             # <<<<<<<<<<<<<<
 * 
 *     def _parse_metainfo(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_28), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_header_lines));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_header_lines));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_header_lines));
  __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 = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser.Reader.raw_header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_9_parse_metainfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_8_parse_metainfo[] = "Parse the information stored in the metainfo of the VCF.\n\n        The end user shouldn't have to use this.  She can access the metainfo\n        directly with ``self.metadata``.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_9_parse_metainfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_metainfo (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8_parse_metainfo(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":904
 *             return ''.join(self._header_lines)
 * 
 *     def _parse_metainfo(self):             # <<<<<<<<<<<<<<
 *         '''Parse the information stored in the metainfo of the VCF.
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_8_parse_metainfo(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_v_parser = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_metainfo", 0);

  /* "cyvcf/parser.pyx":914
 *         #     setattr(self, attr, {})
 * 
 *         parser = _vcf_metadata_parser()             # <<<<<<<<<<<<<<
 * 
 *         line = self.reader.next()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_parser = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":916
 *         parser = _vcf_metadata_parser()
 * 
 *         line = self.reader.next()             # <<<<<<<<<<<<<<
 *         while line.startswith('##'):
 *             self._header_lines.append(line)
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->reader, __pyx_n_s__next); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_line = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":917
 * 
 *         line = self.reader.next()
 *         while line.startswith('##'):             # <<<<<<<<<<<<<<
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')
 */
  while (1) {
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_3) break;

    /* "cyvcf/parser.pyx":918
 *         line = self.reader.next()
 *         while line.startswith('##'):
 *             self._header_lines.append(line)             # <<<<<<<<<<<<<<
 *             line = line.rstrip('\n')
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->_header_lines) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = PyList_Append(__pyx_v_self->_header_lines, __pyx_v_line); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":919
 *         while line.startswith('##'):
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')             # <<<<<<<<<<<<<<
 * 
 *             if line.startswith('##INFO'):
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__rstrip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_line);
    __pyx_v_line = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":921
 *             line = line.rstrip('\n')
 * 
 *             if line.startswith('##INFO'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_info(line)
 *                 self.infos[key] = val
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":922
 * 
 *             if line.startswith('##INFO'):
 *                 key, val = parser.read_info(line)             # <<<<<<<<<<<<<<
 *                 self.infos[key] = val
 * 
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_s__read_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_line);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
      __Pyx_GIVEREF(__pyx_v_line);
      __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 = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_key);
      __pyx_v_key = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":923
 *             if line.startswith('##INFO'):
 *                 key, val = parser.read_info(line)
 *                 self.infos[key] = val             # <<<<<<<<<<<<<<
 * 
 *             elif line.startswith('##FILTER'):
 */
      if (unlikely(((PyObject *)__pyx_v_self->infos) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      if (PyDict_SetItem(((PyObject *)__pyx_v_self->infos), __pyx_v_key, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }

    /* "cyvcf/parser.pyx":925
 *                 self.infos[key] = val
 * 
 *             elif line.startswith('##FILTER'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_filter(line)
 *                 self.filters[key] = val
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":926
 * 
 *             elif line.startswith('##FILTER'):
 *                 key, val = parser.read_filter(line)             # <<<<<<<<<<<<<<
 *                 self.filters[key] = val
 * 
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_s__read_filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_line);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
      __Pyx_GIVEREF(__pyx_v_line);
      __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 = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_key);
      __pyx_v_key = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":927
 *             elif line.startswith('##FILTER'):
 *                 key, val = parser.read_filter(line)
 *                 self.filters[key] = val             # <<<<<<<<<<<<<<
 * 
 *             elif line.startswith('##FORMAT'):
 */
      if (unlikely(((PyObject *)__pyx_v_self->filters) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      if (PyDict_SetItem(((PyObject *)__pyx_v_self->filters), __pyx_v_key, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }

    /* "cyvcf/parser.pyx":929
 *                 self.filters[key] = val
 * 
 *             elif line.startswith('##FORMAT'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_format(line)
 *                 self.formats[key] = val
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_56), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":930
 * 
 *             elif line.startswith('##FORMAT'):
 *                 key, val = parser.read_format(line)             # <<<<<<<<<<<<<<
 *                 self.formats[key] = val
 * 
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_s__read_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_line);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
      __Pyx_GIVEREF(__pyx_v_line);
      __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 = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_key);
      __pyx_v_key = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":931
 *             elif line.startswith('##FORMAT'):
 *                 key, val = parser.read_format(line)
 *                 self.formats[key] = val             # <<<<<<<<<<<<<<
 * 
 *             else:
 */
      if (unlikely(((PyObject *)__pyx_v_self->formats) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      if (PyDict_SetItem(((PyObject *)__pyx_v_self->formats), __pyx_v_key, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":934
 * 
 *             else:
 *                 key, val = parser.read_meta(line.strip())             # <<<<<<<<<<<<<<
 *                 self.metadata[key] = val
 * 
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_s__read_meta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __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 = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L13_unpacking_done;
        __pyx_L12_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L13_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_key);
      __pyx_v_key = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "cyvcf/parser.pyx":935
 *             else:
 *                 key, val = parser.read_meta(line.strip())
 *                 self.metadata[key] = val             # <<<<<<<<<<<<<<
 * 
 *             line = self.reader.next()
 */
      if (unlikely(((PyObject *)__pyx_v_self->metadata) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      if (PyDict_SetItem(((PyObject *)__pyx_v_self->metadata), __pyx_v_key, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;

    /* "cyvcf/parser.pyx":937
 *                 self.metadata[key] = val
 * 
 *             line = self.reader.next()             # <<<<<<<<<<<<<<
 * 
 *         if line.startswith('#'):  # the column def'n line - REQ'D
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->reader, __pyx_n_s__next); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_line);
    __pyx_v_line = __pyx_t_5;
    __pyx_t_5 = 0;
  }

  /* "cyvcf/parser.pyx":939
 *             line = self.reader.next()
 * 
 *         if line.startswith('#'):  # the column def'n line - REQ'D             # <<<<<<<<<<<<<<
 *             self._col_defn_line = line
 *             self._header_lines.append(line)
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":940
 * 
 *         if line.startswith('#'):  # the column def'n line - REQ'D
 *             self._col_defn_line = line             # <<<<<<<<<<<<<<
 *             self._header_lines.append(line)
 *             fields = line.split()
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_line)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __Pyx_GOTREF(__pyx_v_self->_col_defn_line);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_col_defn_line));
    __pyx_v_self->_col_defn_line = ((PyObject*)__pyx_v_line);

    /* "cyvcf/parser.pyx":941
 *         if line.startswith('#'):  # the column def'n line - REQ'D
 *             self._col_defn_line = line
 *             self._header_lines.append(line)             # <<<<<<<<<<<<<<
 *             fields = line.split()
 *             self.samples = fields[9:]
 */
    if (unlikely(((PyObject *)__pyx_v_self->_header_lines) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = PyList_Append(__pyx_v_self->_header_lines, __pyx_v_line); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":942
 *             self._col_defn_line = line
 *             self._header_lines.append(line)
 *             fields = line.split()             # <<<<<<<<<<<<<<
 *             self.samples = fields[9:]
 *             self.num_samples = len(self.samples)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_fields = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":943
 *             self._header_lines.append(line)
 *             fields = line.split()
 *             self.samples = fields[9:]             # <<<<<<<<<<<<<<
 *             self.num_samples = len(self.samples)
 *             self._sample_indexes = dict([(x,i) for (i,x) in enumerate(self.samples)])
 */
    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->samples);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->samples));
    __pyx_v_self->samples = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":944
 *             fields = line.split()
 *             self.samples = fields[9:]
 *             self.num_samples = len(self.samples)             # <<<<<<<<<<<<<<
 *             self._sample_indexes = dict([(x,i) for (i,x) in enumerate(self.samples)])
 *         else:
 */
    __pyx_t_5 = ((PyObject *)__pyx_v_self->samples);
    __Pyx_INCREF(__pyx_t_5);
    if (unlikely(__pyx_t_5 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = PyList_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_self->num_samples = __pyx_t_8;

    /* "cyvcf/parser.pyx":945
 *             self.samples = fields[9:]
 *             self.num_samples = len(self.samples)
 *             self._sample_indexes = dict([(x,i) for (i,x) in enumerate(self.samples)])             # <<<<<<<<<<<<<<
 *         else:
 *              sys.exit("Expected column definition line beginning with #.  Not found - exiting.")
 */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_2 = ((PyObject *)__pyx_v_self->samples); __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF(__pyx_v_x);
      __pyx_v_x = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_i);
      __pyx_v_i = __pyx_t_1;
      __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_t_5));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_5));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_sample_indexes));
    __pyx_v_self->_sample_indexes = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L14;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":947
 *             self._sample_indexes = dict([(x,i) for (i,x) in enumerate(self.samples)])
 *         else:
 *              sys.exit("Expected column definition line beginning with #.  Not found - exiting.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__exit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L14:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_metainfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_11_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_10_map[] = "``map``, but make bad values None.";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_11_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_iterable = 0;
  PyObject *__pyx_v_bad = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_map (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__iterable,&__pyx_n_s__bad,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_kp_s_33);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_map", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bad);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_map") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_iterable = values[1];
    __pyx_v_bad = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_map", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_10_map(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_func, __pyx_v_iterable, __pyx_v_bad);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":950
 * 
 * 
 *     def _map(self, func, iterable, bad='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_10_map(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, PyObject *__pyx_v_bad) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_map", 0);

  /* "cyvcf/parser.pyx":952
 *     def _map(self, func, iterable, bad='.'):
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None             # <<<<<<<<<<<<<<
 *                 for x in iterable]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":953
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyList_CheckExact(__pyx_v_iterable) || PyTuple_CheckExact(__pyx_v_iterable)) {
    __pyx_t_2 = __pyx_v_iterable; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_iterable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":952
 *     def _map(self, func, iterable, bad='.'):
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None             # <<<<<<<<<<<<<<
 *                 for x in iterable]
 * 
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_x, __pyx_v_bad, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_7) {
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __pyx_t_8 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {
      __Pyx_INCREF(Py_None);
      __pyx_t_5 = Py_None;
    }
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cyvcf.parser.Reader._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_13_parse_info(PyObject *__pyx_v_self, PyObject *__pyx_v_info_str); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_12_parse_info[] = "Parse the INFO field of a VCF entry into a dictionary of Python\n        types.\n\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_13_parse_info(PyObject *__pyx_v_self, PyObject *__pyx_v_info_str) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_info (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_12_parse_info(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_info_str));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":956
 * 
 * 
 *     def _parse_info(self, info_str):             # <<<<<<<<<<<<<<
 *         '''Parse the INFO field of a VCF entry into a dictionary of Python
 *         types.
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_12_parse_info(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_info_str) {
  PyObject *__pyx_v_entries = NULL;
  PyObject *__pyx_v_retdict = NULL;
  int __pyx_v_i;
  int __pyx_v_n;
  char *__pyx_v_entry_type;
  PyObject *__pyx_v_entry = NULL;
  PyObject *__pyx_v_ID = NULL;
  PyObject *__pyx_v_vals = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  int __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_info", 0);

  /* "cyvcf/parser.pyx":961
 * 
 *         '''
 *         if info_str == '.':             # <<<<<<<<<<<<<<
 *             return {}
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_info_str, ((PyObject *)__pyx_kp_s_33), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":962
 *         '''
 *         if info_str == '.':
 *             return {}             # <<<<<<<<<<<<<<
 * 
 *         entries = info_str.split(';')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_r = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":964
 *             return {}
 * 
 *         entries = info_str.split(';')             # <<<<<<<<<<<<<<
 *         retdict = {}
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_info_str, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_entries = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":965
 * 
 *         entries = info_str.split(';')
 *         retdict = {}             # <<<<<<<<<<<<<<
 * 
 *         cdef int i = 0
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_v_retdict = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":967
 *         retdict = {}
 * 
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef int n = len(entries)
 *         cdef char *entry_type
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":968
 * 
 *         cdef int i = 0
 *         cdef int n = len(entries)             # <<<<<<<<<<<<<<
 *         cdef char *entry_type
 *         # for entry in entries:
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_entries); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "cyvcf/parser.pyx":971
 *         cdef char *entry_type
 *         # for entry in entries:
 *         for i in xrange(n):             # <<<<<<<<<<<<<<
 *             entry = entries[i].split('=')
 *             # entry = entry.split('=')
 */
  __pyx_t_5 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cyvcf/parser.pyx":972
 *         # for entry in entries:
 *         for i in xrange(n):
 *             entry = entries[i].split('=')             # <<<<<<<<<<<<<<
 *             # entry = entry.split('=')
 *             ID = entry[0]
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entries, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_v_entry);
    __pyx_v_entry = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":974
 *             entry = entries[i].split('=')
 *             # entry = entry.split('=')
 *             ID = entry[0]             # <<<<<<<<<<<<<<
 *             try:
 *                 entry_type = self.infos[ID].type
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_ID);
    __pyx_v_ID = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":975
 *             # entry = entry.split('=')
 *             ID = entry[0]
 *             try:             # <<<<<<<<<<<<<<
 *                 entry_type = self.infos[ID].type
 *             except KeyError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      /*try:*/ {

        /* "cyvcf/parser.pyx":976
 *             ID = entry[0]
 *             try:
 *                 entry_type = self.infos[ID].type             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 try:
 */
        if (unlikely(((PyObject *)__pyx_v_self->infos) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        }
        __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->infos), __pyx_v_ID); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_10 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_entry_type = __pyx_t_10;
      }
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cyvcf/parser.pyx":977
 *             try:
 *                 entry_type = self.infos[ID].type
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 try:
 *                     entry_type = RESERVED_INFO[ID]
 */
      __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_11) {
        __Pyx_AddTraceback("cyvcf.parser.Reader._parse_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_12);

        /* "cyvcf/parser.pyx":978
 *                 entry_type = self.infos[ID].type
 *             except KeyError:
 *                 try:             # <<<<<<<<<<<<<<
 *                     entry_type = RESERVED_INFO[ID]
 *                 except KeyError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {

            /* "cyvcf/parser.pyx":979
 *             except KeyError:
 *                 try:
 *                     entry_type = RESERVED_INFO[ID]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     if entry[1:]:
 */
            __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s__RESERVED_INFO); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_17 = PyObject_GetItem(__pyx_t_16, __pyx_v_ID); if (!__pyx_t_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_10 = PyBytes_AsString(__pyx_t_17); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_v_entry_type = __pyx_t_10;
          }
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L23_try_end;
          __pyx_L16_error:;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;

          /* "cyvcf/parser.pyx":980
 *                 try:
 *                     entry_type = RESERVED_INFO[ID]
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     if entry[1:]:
 *                         entry_type = 'String'
 */
          __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
          if (__pyx_t_11) {
            __Pyx_AddTraceback("cyvcf.parser.Reader._parse_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_GOTREF(__pyx_t_18);

            /* "cyvcf/parser.pyx":981
 *                     entry_type = RESERVED_INFO[ID]
 *                 except KeyError:
 *                     if entry[1:]:             # <<<<<<<<<<<<<<
 *                         entry_type = 'String'
 *                     else:
 */
            __pyx_t_19 = __Pyx_PySequence_GetSlice(__pyx_v_entry, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            if (__pyx_t_2) {

              /* "cyvcf/parser.pyx":982
 *                 except KeyError:
 *                     if entry[1:]:
 *                         entry_type = 'String'             # <<<<<<<<<<<<<<
 *                     else:
 *                         entry_type = 'Flag'
 */
              __pyx_v_entry_type = __pyx_k__String;
              goto __pyx_L26;
            }
            /*else*/ {

              /* "cyvcf/parser.pyx":984
 *                         entry_type = 'String'
 *                     else:
 *                         entry_type = 'Flag'             # <<<<<<<<<<<<<<
 * 
 *             if entry_type == b'Integer':
 */
              __pyx_v_entry_type = __pyx_k__Flag;
            }
            __pyx_L26:;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            goto __pyx_L17_exception_handled;
          }
          __pyx_L18_except_error:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          goto __pyx_L8_except_error;
          __pyx_L17_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_L23_try_end:;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_L13_try_end:;
    }

    /* "cyvcf/parser.pyx":986
 *                         entry_type = 'Flag'
 * 
 *             if entry_type == b'Integer':             # <<<<<<<<<<<<<<
 *                 vals = entry[1].split(',')
 *                 try:
 */
    __pyx_t_12 = PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_12), ((PyObject *)__pyx_n_b__Integer), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":987
 * 
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = self._map(int, vals)
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_64), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_v_vals);
      __pyx_v_vals = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "cyvcf/parser.pyx":988
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')
 *                 try:             # <<<<<<<<<<<<<<
 *                     val = self._map(int, vals)
 *                 except ValueError:
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_7);
        /*try:*/ {

          /* "cyvcf/parser.pyx":989
 *                 vals = entry[1].split(',')
 *                 try:
 *                     val = self._map(int, vals)             # <<<<<<<<<<<<<<
 *                 except ValueError:
 *                     val = self._map(float, vals)
 */
          __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
          PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
          __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
          __Pyx_INCREF(__pyx_v_vals);
          PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_vals);
          __Pyx_GIVEREF(__pyx_v_vals);
          __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_1;
          __pyx_t_1 = 0;
        }
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L35_try_end;
        __pyx_L28_error:;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "cyvcf/parser.pyx":990
 *                 try:
 *                     val = self._map(int, vals)
 *                 except ValueError:             # <<<<<<<<<<<<<<
 *                     val = self._map(float, vals)
 *             elif entry_type == b'Float':
 */
        __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
        if (__pyx_t_11) {
          __Pyx_AddTraceback("cyvcf.parser.Reader._parse_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_12, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GOTREF(__pyx_t_3);

          /* "cyvcf/parser.pyx":991
 *                     val = self._map(int, vals)
 *                 except ValueError:
 *                     val = self._map(float, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')
 */
          __pyx_t_18 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
          PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
          __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
          __Pyx_INCREF(__pyx_v_vals);
          PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_vals);
          __Pyx_GIVEREF(__pyx_v_vals);
          __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_17;
          __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L29_exception_handled;
        }
        __pyx_L30_except_error:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        goto __pyx_L1_error;
        __pyx_L29_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        __pyx_L35_try_end:;
      }
      goto __pyx_L27;
    }

    /* "cyvcf/parser.pyx":992
 *                 except ValueError:
 *                     val = self._map(float, vals)
 *             elif entry_type == b'Float':             # <<<<<<<<<<<<<<
 *                 vals = entry[1].split(',')
 *                 val = self._map(float, vals)
 */
    __pyx_t_3 = PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_12 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_n_b__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":993
 *                     val = self._map(float, vals)
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 val = self._map(float, vals)
 *             elif entry_type == b'Flag':
 */
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_v_vals);
      __pyx_v_vals = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "cyvcf/parser.pyx":994
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')
 *                 val = self._map(float, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Flag':
 *                 val = True
 */
      __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
      __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
      __Pyx_INCREF(__pyx_v_vals);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_vals);
      __Pyx_GIVEREF(__pyx_v_vals);
      __pyx_t_1 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L27;
    }

    /* "cyvcf/parser.pyx":995
 *                 vals = entry[1].split(',')
 *                 val = self._map(float, vals)
 *             elif entry_type == b'Flag':             # <<<<<<<<<<<<<<
 *                 val = True
 *             elif entry_type == b'String':
 */
    __pyx_t_1 = PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_n_b__Flag), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":996
 *                 val = self._map(float, vals)
 *             elif entry_type == b'Flag':
 *                 val = True             # <<<<<<<<<<<<<<
 *             elif entry_type == b'String':
 *                 try:
 */
      __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L27;
    }

    /* "cyvcf/parser.pyx":997
 *             elif entry_type == b'Flag':
 *                 val = True
 *             elif entry_type == b'String':             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = entry[1]
 */
    __pyx_t_3 = PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_n_b__String), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":998
 *                 val = True
 *             elif entry_type == b'String':
 *                 try:             # <<<<<<<<<<<<<<
 *                     val = entry[1]
 *                 except IndexError:
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "cyvcf/parser.pyx":999
 *             elif entry_type == b'String':
 *                 try:
 *                     val = entry[1]             # <<<<<<<<<<<<<<
 *                 except IndexError:
 *                     val = True
 */
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_1;
          __pyx_t_1 = 0;
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L45_try_end;
        __pyx_L38_error:;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "cyvcf/parser.pyx":1000
 *                 try:
 *                     val = entry[1]
 *                 except IndexError:             # <<<<<<<<<<<<<<
 *                     val = True
 * 
 */
        __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
        if (__pyx_t_11) {
          __Pyx_AddTraceback("cyvcf.parser.Reader._parse_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L40_except_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_12);

          /* "cyvcf/parser.pyx":1001
 *                     val = entry[1]
 *                 except IndexError:
 *                     val = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_t_17 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L40_except_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_XDECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_17;
          __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L39_exception_handled;
        }
        __pyx_L40_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L39_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L45_try_end:;
      }
      goto __pyx_L27;
    }
    __pyx_L27:;

    /* "cyvcf/parser.pyx":1004
 * 
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 if self.infos[ID].num == 1 and entry_type != b'String':
 *                     val = val[0]
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "cyvcf/parser.pyx":1005
 * 
 *             try:
 *                 if self.infos[ID].num == 1 and entry_type != b'String':             # <<<<<<<<<<<<<<
 *                     val = val[0]
 *             except KeyError:
 */
        if (unlikely(((PyObject *)__pyx_v_self->infos) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        }
        __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->infos), __pyx_v_ID); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_3 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_2) {
          __pyx_t_12 = PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_12));
          __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_12), ((PyObject *)__pyx_n_b__String), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
          __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
          __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __pyx_t_20;
        } else {
          __pyx_t_21 = __pyx_t_2;
        }
        if (__pyx_t_21) {

          /* "cyvcf/parser.pyx":1006
 *             try:
 *                 if self.infos[ID].num == 1 and entry_type != b'String':
 *                     val = val[0]             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 pass
 */
          if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L48_error;} }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_val, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L56;
        }
        __pyx_L56:;
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L55_try_end;
      __pyx_L48_error:;
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cyvcf/parser.pyx":1007
 *                 if self.infos[ID].num == 1 and entry_type != b'String':
 *                     val = val[0]
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
      __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_11) {
        PyErr_Restore(0,0,0);
        goto __pyx_L49_exception_handled;
      }
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L49_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      __pyx_L55_try_end:;
    }

    /* "cyvcf/parser.pyx":1010
 *                 pass
 * 
 *             retdict[ID] = val             # <<<<<<<<<<<<<<
 * 
 *         return retdict
 */
    if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (PyDict_SetItem(((PyObject *)__pyx_v_retdict), __pyx_v_ID, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":1012
 *             retdict[ID] = val
 * 
 *         return retdict             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retdict));
  __pyx_r = ((PyObject *)__pyx_v_retdict);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entries);
  __Pyx_XDECREF(__pyx_v_retdict);
  __Pyx_XDECREF(__pyx_v_entry);
  __Pyx_XDECREF(__pyx_v_ID);
  __Pyx_XDECREF(__pyx_v_vals);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_parse_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_14_parse_samples[] = "Parse a sample entry according to the format specified in the FORMAT\n        column.";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_parse_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_samples = 0;
  char *__pyx_v_samp_fmt_s;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_samples (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samples,&__pyx_n_s__samp_fmt_s,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samp_fmt_s)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_samples", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_samples") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_samples = ((PyObject*)values[0]);
    __pyx_v_samp_fmt_s = PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_samp_fmt_s) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_parse_samples", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samples), (&PyList_Type), 1, "samples", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_14_parse_samples(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_samples, __pyx_v_samp_fmt_s);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1015
 * 
 * 
 *     def _parse_samples(self, list samples, char *samp_fmt_s):             # <<<<<<<<<<<<<<
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_14_parse_samples(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_samples, char *__pyx_v_samp_fmt_s) {
  PyObject *__pyx_v_samp_fmt = 0;
  PyObject *__pyx_v_samp_fmt_types = 0;
  PyObject *__pyx_v_samp_fmt_nums = 0;
  int __pyx_v_i;
  int __pyx_v_n;
  char *__pyx_v_fmt;
  PyObject *__pyx_v_entry_type = NULL;
  PyObject *__pyx_v_entry_num = NULL;
  int __pyx_v_num_hom_ref;
  int __pyx_v_num_het;
  int __pyx_v_num_hom_alt;
  int __pyx_v_num_unknown;
  int __pyx_v_num_called;
  PyObject *__pyx_v_samp_data = 0;
  PyObject *__pyx_v_gt_alleles = 0;
  PyObject *__pyx_v_gt_types = 0;
  PyObject *__pyx_v_gt_phases = 0;
  PyObject *__pyx_v_gt_depths = 0;
  PyObject *__pyx_v_gt_ref_depths = 0;
  PyObject *__pyx_v_gt_alt_depths = 0;
  PyObject *__pyx_v_gt_quals = 0;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_sample = NULL;
  PyObject *__pyx_v_sampdict = NULL;
  struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_call = NULL;
  PyObject *__pyx_v_alleles = NULL;
  PyObject *__pyx_v_type = NULL;
  int __pyx_v_phased;
  PyObject *__pyx_v_depth = NULL;
  PyObject *__pyx_v_ref_depth = NULL;
  PyObject *__pyx_v_alt_depth = NULL;
  PyObject *__pyx_v_qual = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_samples", 0);

  /* "cyvcf/parser.pyx":1018
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 *         cdef list samp_fmt = samp_fmt_s.split(':')             # <<<<<<<<<<<<<<
 *         cdef list samp_fmt_types = []
 *         cdef list samp_fmt_nums = []
 */
  __pyx_t_1 = PyBytes_FromString(__pyx_v_samp_fmt_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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 = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_66), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_samp_fmt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1019
 *         column.'''
 *         cdef list samp_fmt = samp_fmt_s.split(':')
 *         cdef list samp_fmt_types = []             # <<<<<<<<<<<<<<
 *         cdef list samp_fmt_nums = []
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_samp_fmt_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1020
 *         cdef list samp_fmt = samp_fmt_s.split(':')
 *         cdef list samp_fmt_types = []
 *         cdef list samp_fmt_nums = []             # <<<<<<<<<<<<<<
 * 
 *         cdef int i = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_samp_fmt_nums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1022
 *         cdef list samp_fmt_nums = []
 * 
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef int n = len(samp_fmt)
 *         cdef char *fmt
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":1023
 * 
 *         cdef int i = 0
 *         cdef int n = len(samp_fmt)             # <<<<<<<<<<<<<<
 *         cdef char *fmt
 *         # for fmt in samp_fmt:
 */
  if (unlikely(((PyObject *)__pyx_v_samp_fmt) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_samp_fmt)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "cyvcf/parser.pyx":1026
 *         cdef char *fmt
 *         # for fmt in samp_fmt:
 *         for i in xrange(n):             # <<<<<<<<<<<<<<
 *             fmt = samp_fmt[i]
 *             try:
 */
  __pyx_t_4 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cyvcf/parser.pyx":1027
 *         # for fmt in samp_fmt:
 *         for i in xrange(n):
 *             fmt = samp_fmt[i]             # <<<<<<<<<<<<<<
 *             try:
 *                 entry_type = self.formats[fmt].type
 */
    if (unlikely(((PyObject *)__pyx_v_samp_fmt) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_samp_fmt), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_fmt = __pyx_t_6;

    /* "cyvcf/parser.pyx":1028
 *         for i in xrange(n):
 *             fmt = samp_fmt[i]
 *             try:             # <<<<<<<<<<<<<<
 *                 entry_type = self.formats[fmt].type
 *                 entry_num = self.formats[fmt].num
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      /*try:*/ {

        /* "cyvcf/parser.pyx":1029
 *             fmt = samp_fmt[i]
 *             try:
 *                 entry_type = self.formats[fmt].type             # <<<<<<<<<<<<<<
 *                 entry_num = self.formats[fmt].num
 *             except KeyError:
 */
        if (unlikely(((PyObject *)__pyx_v_self->formats) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        }
        __pyx_t_1 = PyBytes_FromString(__pyx_v_fmt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
        __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->formats), ((PyObject *)__pyx_t_1)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_entry_type);
        __pyx_v_entry_type = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "cyvcf/parser.pyx":1030
 *             try:
 *                 entry_type = self.formats[fmt].type
 *                 entry_num = self.formats[fmt].num             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 entry_num = None
 */
        if (unlikely(((PyObject *)__pyx_v_self->formats) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        }
        __pyx_t_1 = PyBytes_FromString(__pyx_v_fmt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
        __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->formats), ((PyObject *)__pyx_t_1)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__num); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_entry_num);
        __pyx_v_entry_num = __pyx_t_1;
        __pyx_t_1 = 0;
      }
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cyvcf/parser.pyx":1031
 *                 entry_type = self.formats[fmt].type
 *                 entry_num = self.formats[fmt].num
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 entry_num = None
 *                 try:
 */
      __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_10) {
        __Pyx_AddTraceback("cyvcf.parser.Reader._parse_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_11);

        /* "cyvcf/parser.pyx":1032
 *                 entry_num = self.formats[fmt].num
 *             except KeyError:
 *                 entry_num = None             # <<<<<<<<<<<<<<
 *                 try:
 *                     entry_type = RESERVED_FORMAT[fmt]
 */
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF(__pyx_v_entry_num);
        __pyx_v_entry_num = Py_None;

        /* "cyvcf/parser.pyx":1033
 *             except KeyError:
 *                 entry_num = None
 *                 try:             # <<<<<<<<<<<<<<
 *                     entry_type = RESERVED_FORMAT[fmt]
 *                 except KeyError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {

            /* "cyvcf/parser.pyx":1034
 *                 entry_num = None
 *                 try:
 *                     entry_type = RESERVED_FORMAT[fmt]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     entry_type = 'String'
 */
            __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__RESERVED_FORMAT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_16 = PyBytes_FromString(__pyx_v_fmt); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_16));
            __pyx_t_17 = PyObject_GetItem(__pyx_t_15, ((PyObject *)__pyx_t_16)); if (!__pyx_t_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_v_entry_type);
            __pyx_v_entry_type = __pyx_t_17;
            __pyx_t_17 = 0;
          }
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L22_try_end;
          __pyx_L15_error:;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;

          /* "cyvcf/parser.pyx":1035
 *                 try:
 *                     entry_type = RESERVED_FORMAT[fmt]
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     entry_type = 'String'
 *             samp_fmt_types.append(entry_type)
 */
          __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
          if (__pyx_t_10) {
            __Pyx_AddTraceback("cyvcf.parser.Reader._parse_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_GOTREF(__pyx_t_15);

            /* "cyvcf/parser.pyx":1036
 *                     entry_type = RESERVED_FORMAT[fmt]
 *                 except KeyError:
 *                     entry_type = 'String'             # <<<<<<<<<<<<<<
 *             samp_fmt_types.append(entry_type)
 *             samp_fmt_nums.append(entry_num)
 */
            __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
            __Pyx_XDECREF(__pyx_v_entry_type);
            __pyx_v_entry_type = ((PyObject *)__pyx_n_s__String);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            goto __pyx_L16_exception_handled;
          }
          __pyx_L17_except_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L7_except_error;
          __pyx_L16_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_L22_try_end:;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_L12_try_end:;
    }

    /* "cyvcf/parser.pyx":1037
 *                 except KeyError:
 *                     entry_type = 'String'
 *             samp_fmt_types.append(entry_type)             # <<<<<<<<<<<<<<
 *             samp_fmt_nums.append(entry_num)
 * 
 */
    __pyx_t_18 = PyList_Append(__pyx_v_samp_fmt_types, __pyx_v_entry_type); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1038
 *                     entry_type = 'String'
 *             samp_fmt_types.append(entry_type)
 *             samp_fmt_nums.append(entry_num)             # <<<<<<<<<<<<<<
 * 
 *         cdef int num_hom_ref = 0
 */
    __pyx_t_18 = PyList_Append(__pyx_v_samp_fmt_nums, __pyx_v_entry_num); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":1040
 *             samp_fmt_nums.append(entry_num)
 * 
 *         cdef int num_hom_ref = 0             # <<<<<<<<<<<<<<
 *         cdef int num_het = 0
 *         cdef int num_hom_alt = 0
 */
  __pyx_v_num_hom_ref = 0;

  /* "cyvcf/parser.pyx":1041
 * 
 *         cdef int num_hom_ref = 0
 *         cdef int num_het = 0             # <<<<<<<<<<<<<<
 *         cdef int num_hom_alt = 0
 *         cdef int num_unknown = 0
 */
  __pyx_v_num_het = 0;

  /* "cyvcf/parser.pyx":1042
 *         cdef int num_hom_ref = 0
 *         cdef int num_het = 0
 *         cdef int num_hom_alt = 0             # <<<<<<<<<<<<<<
 *         cdef int num_unknown = 0
 *         cdef int num_called = 0
 */
  __pyx_v_num_hom_alt = 0;

  /* "cyvcf/parser.pyx":1043
 *         cdef int num_het = 0
 *         cdef int num_hom_alt = 0
 *         cdef int num_unknown = 0             # <<<<<<<<<<<<<<
 *         cdef int num_called = 0
 *         cdef list samp_data  = []# list of _Call objects for each sample
 */
  __pyx_v_num_unknown = 0;

  /* "cyvcf/parser.pyx":1044
 *         cdef int num_hom_alt = 0
 *         cdef int num_unknown = 0
 *         cdef int num_called = 0             # <<<<<<<<<<<<<<
 *         cdef list samp_data  = []# list of _Call objects for each sample
 *         cdef list gt_alleles = []# A/A, A|G, G/G, etc.
 */
  __pyx_v_num_called = 0;

  /* "cyvcf/parser.pyx":1045
 *         cdef int num_unknown = 0
 *         cdef int num_called = 0
 *         cdef list samp_data  = []# list of _Call objects for each sample             # <<<<<<<<<<<<<<
 *         cdef list gt_alleles = []# A/A, A|G, G/G, etc.
 *         cdef list gt_types   = []# 0, 1, 2, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_samp_data = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1046
 *         cdef int num_called = 0
 *         cdef list samp_data  = []# list of _Call objects for each sample
 *         cdef list gt_alleles = []# A/A, A|G, G/G, etc.             # <<<<<<<<<<<<<<
 *         cdef list gt_types   = []# 0, 1, 2, etc.
 *         cdef list gt_phases  = []# T, F, T, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_alleles = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1047
 *         cdef list samp_data  = []# list of _Call objects for each sample
 *         cdef list gt_alleles = []# A/A, A|G, G/G, etc.
 *         cdef list gt_types   = []# 0, 1, 2, etc.             # <<<<<<<<<<<<<<
 *         cdef list gt_phases  = []# T, F, T, etc.
 *         cdef list gt_depths  = []# 10, 37, 0, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_types = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1048
 *         cdef list gt_alleles = []# A/A, A|G, G/G, etc.
 *         cdef list gt_types   = []# 0, 1, 2, etc.
 *         cdef list gt_phases  = []# T, F, T, etc.             # <<<<<<<<<<<<<<
 *         cdef list gt_depths  = []# 10, 37, 0, etc.
 *         cdef list gt_ref_depths  = []# 3, 32, 0, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_phases = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1049
 *         cdef list gt_types   = []# 0, 1, 2, etc.
 *         cdef list gt_phases  = []# T, F, T, etc.
 *         cdef list gt_depths  = []# 10, 37, 0, etc.             # <<<<<<<<<<<<<<
 *         cdef list gt_ref_depths  = []# 3, 32, 0, etc.
 *         cdef list gt_alt_depths  = []# 7, 5, 0, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_depths = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1050
 *         cdef list gt_phases  = []# T, F, T, etc.
 *         cdef list gt_depths  = []# 10, 37, 0, etc.
 *         cdef list gt_ref_depths  = []# 3, 32, 0, etc.             # <<<<<<<<<<<<<<
 *         cdef list gt_alt_depths  = []# 7, 5, 0, etc.
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_ref_depths = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1051
 *         cdef list gt_depths  = []# 10, 37, 0, etc.
 *         cdef list gt_ref_depths  = []# 3, 32, 0, etc.
 *         cdef list gt_alt_depths  = []# 7, 5, 0, etc.             # <<<<<<<<<<<<<<
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 *         i = 0
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_alt_depths = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1052
 *         cdef list gt_ref_depths  = []# 3, 32, 0, etc.
 *         cdef list gt_alt_depths  = []# 7, 5, 0, etc.
 *         cdef list gt_quals  = []# 10, 30, 20, etc.             # <<<<<<<<<<<<<<
 *         i = 0
 *         for i in xrange(self.num_samples):
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_quals = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1053
 *         cdef list gt_alt_depths  = []# 7, 5, 0, etc.
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 *         i = 0             # <<<<<<<<<<<<<<
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":1054
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 *         i = 0
 *         for i in xrange(self.num_samples):             # <<<<<<<<<<<<<<
 *             name = self.samples[i]
 *             sample = samples[i]
 */
  __pyx_t_4 = __pyx_v_self->num_samples;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cyvcf/parser.pyx":1055
 *         i = 0
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]             # <<<<<<<<<<<<<<
 *             sample = samples[i]
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->samples) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->samples), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_11;
    __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":1056
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]
 *             sample = samples[i]             # <<<<<<<<<<<<<<
 * 
 *             sampdict = self._parse_sample(sample, samp_fmt, \
 */
    if (unlikely(((PyObject *)__pyx_v_samples) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_samples), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_XDECREF(__pyx_v_sample);
    __pyx_v_sample = __pyx_t_11;
    __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":1058
 *             sample = samples[i]
 * 
 *             sampdict = self._parse_sample(sample, samp_fmt, \             # <<<<<<<<<<<<<<
 *                                           samp_fmt_types, samp_fmt_nums)
 *             call = _Call(self.curr_record, name, sampdict)
 */
    __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parse_sample); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);

    /* "cyvcf/parser.pyx":1059
 * 
 *             sampdict = self._parse_sample(sample, samp_fmt, \
 *                                           samp_fmt_types, samp_fmt_nums)             # <<<<<<<<<<<<<<
 *             call = _Call(self.curr_record, name, sampdict)
 *             samp_data.append(call)
 */
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_sample);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sample);
    __Pyx_GIVEREF(__pyx_v_sample);
    __Pyx_INCREF(((PyObject *)__pyx_v_samp_fmt));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samp_fmt));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_samp_fmt));
    __Pyx_INCREF(((PyObject *)__pyx_v_samp_fmt_types));
    PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_samp_fmt_types));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_samp_fmt_types));
    __Pyx_INCREF(((PyObject *)__pyx_v_samp_fmt_nums));
    PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_samp_fmt_nums));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_samp_fmt_nums));
    __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_sampdict);
    __pyx_v_sampdict = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1060
 *             sampdict = self._parse_sample(sample, samp_fmt, \
 *                                           samp_fmt_types, samp_fmt_nums)
 *             call = _Call(self.curr_record, name, sampdict)             # <<<<<<<<<<<<<<
 *             samp_data.append(call)
 * 
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->curr_record));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->curr_record));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->curr_record));
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_sampdict);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_sampdict);
    __Pyx_GIVEREF(__pyx_v_sampdict);
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Call)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_XDECREF(((PyObject *)__pyx_v_call));
    __pyx_v_call = ((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1061
 *                                           samp_fmt_types, samp_fmt_nums)
 *             call = _Call(self.curr_record, name, sampdict)
 *             samp_data.append(call)             # <<<<<<<<<<<<<<
 * 
 *             alleles = call.gt_bases
 */
    __pyx_t_18 = PyList_Append(__pyx_v_samp_data, ((PyObject *)__pyx_v_call)); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1063
 *             samp_data.append(call)
 * 
 *             alleles = call.gt_bases             # <<<<<<<<<<<<<<
 *             type = call.gt_type
 *             phased = call.phased
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_call), __pyx_n_s__gt_bases); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_alleles);
    __pyx_v_alleles = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1064
 * 
 *             alleles = call.gt_bases
 *             type = call.gt_type             # <<<<<<<<<<<<<<
 *             phased = call.phased
 *             depth = call.gt_depth
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_call), __pyx_n_s__gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_type);
    __pyx_v_type = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1065
 *             alleles = call.gt_bases
 *             type = call.gt_type
 *             phased = call.phased             # <<<<<<<<<<<<<<
 *             depth = call.gt_depth
 *             ref_depth = call.gt_ref_depth
 */
    __pyx_t_19 = __pyx_v_call->phased;
    __pyx_v_phased = __pyx_t_19;

    /* "cyvcf/parser.pyx":1066
 *             type = call.gt_type
 *             phased = call.phased
 *             depth = call.gt_depth             # <<<<<<<<<<<<<<
 *             ref_depth = call.gt_ref_depth
 *             alt_depth = call.gt_alt_depth
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_call), __pyx_n_s__gt_depth); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_depth);
    __pyx_v_depth = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1067
 *             phased = call.phased
 *             depth = call.gt_depth
 *             ref_depth = call.gt_ref_depth             # <<<<<<<<<<<<<<
 *             alt_depth = call.gt_alt_depth
 *             qual = call.gt_qual
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_call), __pyx_n_s__gt_ref_depth); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_ref_depth);
    __pyx_v_ref_depth = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1068
 *             depth = call.gt_depth
 *             ref_depth = call.gt_ref_depth
 *             alt_depth = call.gt_alt_depth             # <<<<<<<<<<<<<<
 *             qual = call.gt_qual
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_call), __pyx_n_s__gt_alt_depth); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_alt_depth);
    __pyx_v_alt_depth = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1069
 *             ref_depth = call.gt_ref_depth
 *             alt_depth = call.gt_alt_depth
 *             qual = call.gt_qual             # <<<<<<<<<<<<<<
 * 
 *             # add to the "all-samples" lists of GT info
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_call), __pyx_n_s__gt_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_qual);
    __pyx_v_qual = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1072
 * 
 *             # add to the "all-samples" lists of GT info
 *             if alleles is not None:             # <<<<<<<<<<<<<<
 *                 gt_alleles.append(alleles)
 *                 gt_types.append(type)
 */
    __pyx_t_19 = (__pyx_v_alleles != Py_None);
    if (__pyx_t_19) {

      /* "cyvcf/parser.pyx":1073
 *             # add to the "all-samples" lists of GT info
 *             if alleles is not None:
 *                 gt_alleles.append(alleles)             # <<<<<<<<<<<<<<
 *                 gt_types.append(type)
 *             else:
 */
      __pyx_t_18 = PyList_Append(__pyx_v_gt_alleles, __pyx_v_alleles); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1074
 *             if alleles is not None:
 *                 gt_alleles.append(alleles)
 *                 gt_types.append(type)             # <<<<<<<<<<<<<<
 *             else:
 *                 gt_alleles.append('./.')
 */
      __pyx_t_18 = PyList_Append(__pyx_v_gt_types, __pyx_v_type); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L27;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":1076
 *                 gt_types.append(type)
 *             else:
 *                 gt_alleles.append('./.')             # <<<<<<<<<<<<<<
 *                 gt_types.append(2)
 * 
 */
      __pyx_t_18 = PyList_Append(__pyx_v_gt_alleles, ((PyObject *)__pyx_kp_s_38)); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1077
 *             else:
 *                 gt_alleles.append('./.')
 *                 gt_types.append(2)             # <<<<<<<<<<<<<<
 * 
 *             gt_phases.append(phased)
 */
      __pyx_t_18 = PyList_Append(__pyx_v_gt_types, __pyx_int_2); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L27:;

    /* "cyvcf/parser.pyx":1079
 *                 gt_types.append(2)
 * 
 *             gt_phases.append(phased)             # <<<<<<<<<<<<<<
 *             gt_depths.append(depth)
 *             gt_ref_depths.append(ref_depth)
 */
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_phased); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = PyList_Append(__pyx_v_gt_phases, __pyx_t_2); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1080
 * 
 *             gt_phases.append(phased)
 *             gt_depths.append(depth)             # <<<<<<<<<<<<<<
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)
 */
    __pyx_t_18 = PyList_Append(__pyx_v_gt_depths, __pyx_v_depth); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1081
 *             gt_phases.append(phased)
 *             gt_depths.append(depth)
 *             gt_ref_depths.append(ref_depth)             # <<<<<<<<<<<<<<
 *             gt_alt_depths.append(alt_depth)
 *             gt_quals.append(qual)
 */
    __pyx_t_18 = PyList_Append(__pyx_v_gt_ref_depths, __pyx_v_ref_depth); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1082
 *             gt_depths.append(depth)
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)             # <<<<<<<<<<<<<<
 *             gt_quals.append(qual)
 * 
 */
    __pyx_t_18 = PyList_Append(__pyx_v_gt_alt_depths, __pyx_v_alt_depth); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1083
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)
 *             gt_quals.append(qual)             # <<<<<<<<<<<<<<
 * 
 *             # 0 / 00000000 hom ref
 */
    __pyx_t_18 = PyList_Append(__pyx_v_gt_quals, __pyx_v_qual); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1091
 * 
 *             # tally the appropriate GT count
 *             if type == HOM_REF: num_hom_ref += 1             # <<<<<<<<<<<<<<
 *             elif type == HET: num_het += 1
 *             elif type == HOM_ALT: num_hom_alt += 1
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_19) {
      __pyx_v_num_hom_ref = (__pyx_v_num_hom_ref + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1092
 *             # tally the appropriate GT count
 *             if type == HOM_REF: num_hom_ref += 1
 *             elif type == HET: num_het += 1             # <<<<<<<<<<<<<<
 *             elif type == HOM_ALT: num_hom_alt += 1
 *             elif type == None: num_unknown += 1
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HET); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_19) {
      __pyx_v_num_het = (__pyx_v_num_het + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1093
 *             if type == HOM_REF: num_hom_ref += 1
 *             elif type == HET: num_het += 1
 *             elif type == HOM_ALT: num_hom_alt += 1             # <<<<<<<<<<<<<<
 *             elif type == None: num_unknown += 1
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HOM_ALT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_19) {
      __pyx_v_num_hom_alt = (__pyx_v_num_hom_alt + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1094
 *             elif type == HET: num_het += 1
 *             elif type == HOM_ALT: num_hom_alt += 1
 *             elif type == None: num_unknown += 1             # <<<<<<<<<<<<<<
 * 
 *         num_called = num_hom_ref + num_het + num_hom_alt
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_type, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_19) {
      __pyx_v_num_unknown = (__pyx_v_num_unknown + 1);
      goto __pyx_L28;
    }
    __pyx_L28:;
  }

  /* "cyvcf/parser.pyx":1096
 *             elif type == None: num_unknown += 1
 * 
 *         num_called = num_hom_ref + num_het + num_hom_alt             # <<<<<<<<<<<<<<
 * 
 *         return _SampleInfo(samples=samp_data, gt_bases=gt_alleles,
 */
  __pyx_v_num_called = ((__pyx_v_num_hom_ref + __pyx_v_num_het) + __pyx_v_num_hom_alt);

  /* "cyvcf/parser.pyx":1098
 *         num_called = num_hom_ref + num_het + num_hom_alt
 * 
 *         return _SampleInfo(samples=samp_data, gt_bases=gt_alleles,             # <<<<<<<<<<<<<<
 *                            gt_types=gt_types, gt_phases=gt_phases,
 *                            gt_depths=gt_depths, gt_ref_depths=gt_ref_depths,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___SampleInfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__samples), ((PyObject *)__pyx_v_samp_data)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_bases), ((PyObject *)__pyx_v_gt_alleles)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1099
 * 
 *         return _SampleInfo(samples=samp_data, gt_bases=gt_alleles,
 *                            gt_types=gt_types, gt_phases=gt_phases,             # <<<<<<<<<<<<<<
 *                            gt_depths=gt_depths, gt_ref_depths=gt_ref_depths,
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_types), ((PyObject *)__pyx_v_gt_types)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_phases), ((PyObject *)__pyx_v_gt_phases)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1100
 *         return _SampleInfo(samples=samp_data, gt_bases=gt_alleles,
 *                            gt_types=gt_types, gt_phases=gt_phases,
 *                            gt_depths=gt_depths, gt_ref_depths=gt_ref_depths,             # <<<<<<<<<<<<<<
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_depths), ((PyObject *)__pyx_v_gt_depths)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_ref_depths), ((PyObject *)__pyx_v_gt_ref_depths)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1101
 *                            gt_types=gt_types, gt_phases=gt_phases,
 *                            gt_depths=gt_depths, gt_ref_depths=gt_ref_depths,
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,             # <<<<<<<<<<<<<<
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 *                            num_hom_alt=num_hom_alt, num_unknown=num_unknown,
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_alt_depths), ((PyObject *)__pyx_v_gt_alt_depths)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gt_quals), ((PyObject *)__pyx_v_gt_quals)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1102
 *                            gt_depths=gt_depths, gt_ref_depths=gt_ref_depths,
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 *                            num_hom_ref=num_hom_ref, num_het=num_het,             # <<<<<<<<<<<<<<
 *                            num_hom_alt=num_hom_alt, num_unknown=num_unknown,
 *                            num_called=num_called)
 */
  __pyx_t_11 = PyInt_FromLong(__pyx_v_num_hom_ref); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_hom_ref), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyInt_FromLong(__pyx_v_num_het); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_het), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1103
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 *                            num_hom_alt=num_hom_alt, num_unknown=num_unknown,             # <<<<<<<<<<<<<<
 *                            num_called=num_called)
 * 
 */
  __pyx_t_11 = PyInt_FromLong(__pyx_v_num_hom_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_hom_alt), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyInt_FromLong(__pyx_v_num_unknown); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_unknown), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1104
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 *                            num_hom_alt=num_hom_alt, num_unknown=num_unknown,
 *                            num_called=num_called)             # <<<<<<<<<<<<<<
 * 
 *     def _parse_sample(self, char *sample, list samp_fmt,
 */
  __pyx_t_11 = PyInt_FromLong(__pyx_v_num_called); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_called), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_samp_fmt);
  __Pyx_XDECREF(__pyx_v_samp_fmt_types);
  __Pyx_XDECREF(__pyx_v_samp_fmt_nums);
  __Pyx_XDECREF(__pyx_v_entry_type);
  __Pyx_XDECREF(__pyx_v_entry_num);
  __Pyx_XDECREF(__pyx_v_samp_data);
  __Pyx_XDECREF(__pyx_v_gt_alleles);
  __Pyx_XDECREF(__pyx_v_gt_types);
  __Pyx_XDECREF(__pyx_v_gt_phases);
  __Pyx_XDECREF(__pyx_v_gt_depths);
  __Pyx_XDECREF(__pyx_v_gt_ref_depths);
  __Pyx_XDECREF(__pyx_v_gt_alt_depths);
  __Pyx_XDECREF(__pyx_v_gt_quals);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_sample);
  __Pyx_XDECREF(__pyx_v_sampdict);
  __Pyx_XDECREF((PyObject *)__pyx_v_call);
  __Pyx_XDECREF(__pyx_v_alleles);
  __Pyx_XDECREF(__pyx_v_type);
  __Pyx_XDECREF(__pyx_v_depth);
  __Pyx_XDECREF(__pyx_v_ref_depth);
  __Pyx_XDECREF(__pyx_v_alt_depth);
  __Pyx_XDECREF(__pyx_v_qual);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_17_parse_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_17_parse_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  char *__pyx_v_sample;
  PyObject *__pyx_v_samp_fmt = 0;
  PyObject *__pyx_v_samp_fmt_types = 0;
  PyObject *__pyx_v_samp_fmt_nums = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_sample (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sample,&__pyx_n_s__samp_fmt,&__pyx_n_s__samp_fmt_types,&__pyx_n_s__samp_fmt_nums,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sample)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samp_fmt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_sample", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samp_fmt_types)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_sample", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samp_fmt_nums)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_sample", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_sample = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_sample) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_samp_fmt = ((PyObject*)values[1]);
    __pyx_v_samp_fmt_types = ((PyObject*)values[2]);
    __pyx_v_samp_fmt_nums = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_parse_sample", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samp_fmt), (&PyList_Type), 1, "samp_fmt", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samp_fmt_types), (&PyList_Type), 1, "samp_fmt_types", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samp_fmt_nums), (&PyList_Type), 1, "samp_fmt_nums", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_16_parse_sample(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_sample, __pyx_v_samp_fmt, __pyx_v_samp_fmt_types, __pyx_v_samp_fmt_nums);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1106
 *                            num_called=num_called)
 * 
 *     def _parse_sample(self, char *sample, list samp_fmt,             # <<<<<<<<<<<<<<
 *                             list samp_fmt_types, list samp_fmt_nums):
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_16_parse_sample(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, char *__pyx_v_sample, PyObject *__pyx_v_samp_fmt, PyObject *__pyx_v_samp_fmt_types, PyObject *__pyx_v_samp_fmt_nums) {
  PyObject *__pyx_v_sampdict = 0;
  PyObject *__pyx_v_fmt = NULL;
  PyObject *__pyx_v_entry_type = NULL;
  PyObject *__pyx_v_entry_num = NULL;
  PyObject *__pyx_v_vals = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  double __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_sample", 0);

  /* "cyvcf/parser.pyx":1109
 *                             list samp_fmt_types, list samp_fmt_nums):
 * 
 *         cdef dict sampdict = dict([(x, None) for x in samp_fmt])             # <<<<<<<<<<<<<<
 * 
 *         # TO DO: Optimize this into a C-loop
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_samp_fmt) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_samp_fmt); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
    __Pyx_GIVEREF(Py_None);
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_sampdict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1112
 * 
 *         # TO DO: Optimize this into a C-loop
 *         for fmt, entry_type, entry_num, vals in itertools.izip(             # <<<<<<<<<<<<<<
 *                 samp_fmt, samp_fmt_types, samp_fmt_nums, sample.split(':')):
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__itertools); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__izip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1113
 *         # TO DO: Optimize this into a C-loop
 *         for fmt, entry_type, entry_num, vals in itertools.izip(
 *                 samp_fmt, samp_fmt_types, samp_fmt_nums, sample.split(':')):             # <<<<<<<<<<<<<<
 * 
 *             # short circuit the most common
 */
  __pyx_t_1 = PyBytes_FromString(__pyx_v_sample); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_1), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_samp_fmt));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_samp_fmt));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_samp_fmt));
  __Pyx_INCREF(((PyObject *)__pyx_v_samp_fmt_types));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_samp_fmt_types));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_samp_fmt_types));
  __Pyx_INCREF(((PyObject *)__pyx_v_samp_fmt_nums));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_samp_fmt_nums));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_samp_fmt_nums));
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {

    /* "cyvcf/parser.pyx":1112
 * 
 *         # TO DO: Optimize this into a C-loop
 *         for fmt, entry_type, entry_num, vals in itertools.izip(             # <<<<<<<<<<<<<<
 *                 samp_fmt, samp_fmt_types, samp_fmt_nums, sample.split(':')):
 * 
 */
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_4)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_4)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
      __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_fmt);
    __pyx_v_fmt = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_entry_type);
    __pyx_v_entry_type = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_entry_num);
    __pyx_v_entry_num = __pyx_t_7;
    __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_v_vals);
    __pyx_v_vals = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":1116
 * 
 *             # short circuit the most common
 *             if vals == '.' or vals == './.':             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = None
 *                 continue
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_vals, ((PyObject *)__pyx_kp_s_33), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_11) {
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_vals, ((PyObject *)__pyx_kp_s_38), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __pyx_t_12;
    } else {
      __pyx_t_13 = __pyx_t_11;
    }
    if (__pyx_t_13) {

      /* "cyvcf/parser.pyx":1117
 *             # short circuit the most common
 *             if vals == '.' or vals == './.':
 *                 sampdict[fmt] = None             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1118
 *             if vals == '.' or vals == './.':
 *                 sampdict[fmt] = None
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             # we don't need to split single entries
 */
      goto __pyx_L5_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "cyvcf/parser.pyx":1121
 * 
 *             # we don't need to split single entries
 *             if entry_num == 1 or ',' not in vals:             # <<<<<<<<<<<<<<
 *                 if entry_type == 'Integer':
 *                     try:
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_entry_num, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_13) {
      __pyx_t_11 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_32), __pyx_v_vals, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __pyx_t_11;
    } else {
      __pyx_t_12 = __pyx_t_13;
    }
    if (__pyx_t_12) {

      /* "cyvcf/parser.pyx":1122
 *             # we don't need to split single entries
 *             if entry_num == 1 or ',' not in vals:
 *                 if entry_type == 'Integer':             # <<<<<<<<<<<<<<
 *                     try:
 *                         sampdict[fmt] = int(vals)
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_entry_type, ((PyObject *)__pyx_n_s__Integer), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_12) {

        /* "cyvcf/parser.pyx":1123
 *             if entry_num == 1 or ',' not in vals:
 *                 if entry_type == 'Integer':
 *                     try:             # <<<<<<<<<<<<<<
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {

            /* "cyvcf/parser.pyx":1124
 *                 if entry_type == 'Integer':
 *                     try:
 *                         sampdict[fmt] = int(vals)             # <<<<<<<<<<<<<<
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)
 */
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_vals);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_vals);
            __Pyx_GIVEREF(__pyx_v_vals);
            __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
            if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L19_try_end;
          __pyx_L12_error:;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "cyvcf/parser.pyx":1125
 *                     try:
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:             # <<<<<<<<<<<<<<
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':
 */
          __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
          if (__pyx_t_17) {
            __Pyx_AddTraceback("cyvcf.parser.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_7);

            /* "cyvcf/parser.pyx":1126
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)             # <<<<<<<<<<<<<<
 *                 elif entry_type == 'Float':
 *                     sampdict[fmt] = float(vals)
 */
            __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_v_vals); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __pyx_t_6 = PyFloat_FromDouble(__pyx_t_18); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_6);
            if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L13_exception_handled;
          }
          __pyx_L14_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L13_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L19_try_end:;
        }
        goto __pyx_L11;
      }

      /* "cyvcf/parser.pyx":1127
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':             # <<<<<<<<<<<<<<
 *                     sampdict[fmt] = float(vals)
 *                 else:
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_entry_type, ((PyObject *)__pyx_n_s__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_12) {

        /* "cyvcf/parser.pyx":1128
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':
 *                     sampdict[fmt] = float(vals)             # <<<<<<<<<<<<<<
 *                 else:
 *                     sampdict[fmt] = vals
 */
        __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_v_vals); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = PyFloat_FromDouble(__pyx_t_18); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":1130
 *                     sampdict[fmt] = float(vals)
 *                 else:
 *                     sampdict[fmt] = vals             # <<<<<<<<<<<<<<
 * 
 *                 if entry_num != 1:
 */
        if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_v_vals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L11:;

      /* "cyvcf/parser.pyx":1132
 *                     sampdict[fmt] = vals
 * 
 *                 if entry_num != 1:             # <<<<<<<<<<<<<<
 *                     sampdict[fmt] = (sampdict[fmt])
 * 
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_entry_num, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_12) {

        /* "cyvcf/parser.pyx":1133
 * 
 *                 if entry_num != 1:
 *                     sampdict[fmt] = (sampdict[fmt])             # <<<<<<<<<<<<<<
 * 
 *                 continue
 */
        __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L22;
      }
      __pyx_L22:;

      /* "cyvcf/parser.pyx":1135
 *                     sampdict[fmt] = (sampdict[fmt])
 * 
 *                 continue             # <<<<<<<<<<<<<<
 * 
 * 
 */
      goto __pyx_L5_continue;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "cyvcf/parser.pyx":1138
 * 
 * 
 *             vals = vals.split(',')             # <<<<<<<<<<<<<<
 * 
 *             if entry_type == 'Integer':
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_vals, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_v_vals);
    __pyx_v_vals = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1140
 *             vals = vals.split(',')
 * 
 *             if entry_type == 'Integer':             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = self._map(int, vals)
 *             elif entry_type == 'Float' or entry_type == 'Numeric':
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_entry_type, ((PyObject *)__pyx_n_s__Integer), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_12) {

      /* "cyvcf/parser.pyx":1141
 * 
 *             if entry_type == 'Integer':
 *                 sampdict[fmt] = self._map(int, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == 'Float' or entry_type == 'Numeric':
 *                 sampdict[fmt] = self._map(float, vals)
 */
      __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
      __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
      __Pyx_INCREF(__pyx_v_vals);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_vals);
      __Pyx_GIVEREF(__pyx_v_vals);
      __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 = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L23;
    }

    /* "cyvcf/parser.pyx":1142
 *             if entry_type == 'Integer':
 *                 sampdict[fmt] = self._map(int, vals)
 *             elif entry_type == 'Float' or entry_type == 'Numeric':             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = self._map(float, vals)
 *             else:
 */
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_entry_type, ((PyObject *)__pyx_n_s__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!__pyx_t_12) {
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_entry_type, ((PyObject *)__pyx_n_s__Numeric), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_11 = __pyx_t_13;
    } else {
      __pyx_t_11 = __pyx_t_12;
    }
    if (__pyx_t_11) {

      /* "cyvcf/parser.pyx":1143
 *                 sampdict[fmt] = self._map(int, vals)
 *             elif entry_type == 'Float' or entry_type == 'Numeric':
 *                 sampdict[fmt] = self._map(float, vals)             # <<<<<<<<<<<<<<
 *             else:
 *                 sampdict[fmt] = vals
 */
      __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
      __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
      __Pyx_INCREF(__pyx_v_vals);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_vals);
      __Pyx_GIVEREF(__pyx_v_vals);
      __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L23;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":1145
 *                 sampdict[fmt] = self._map(float, vals)
 *             else:
 *                 sampdict[fmt] = vals             # <<<<<<<<<<<<<<
 * 
 *         return sampdict
 */
      if (PyDict_SetItem(((PyObject *)__pyx_v_sampdict), __pyx_v_fmt, __pyx_v_vals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L23:;
    __pyx_L5_continue:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1147
 *                 sampdict[fmt] = vals
 * 
 *         return sampdict             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_sampdict));
  __pyx_r = ((PyObject *)__pyx_v_sampdict);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sampdict);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XDECREF(__pyx_v_entry_type);
  __Pyx_XDECREF(__pyx_v_entry_num);
  __Pyx_XDECREF(__pyx_v_vals);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_19__next__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_18__next__[] = "Return the next record in the file.";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5cyvcf_6parser_6Reader_18__next__;
#endif
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_19__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_18__next__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1150
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_18__next__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_chrom = 0;
  int __pyx_v_pos;
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_alt = 0;
  PyObject *__pyx_v_qual = 0;
  PyObject *__pyx_v_filt = 0;
  PyObject *__pyx_v_info = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_sample_info = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  double __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cyvcf/parser.pyx":1155
 *         #self._load_line(self.reader.next())
 *         cdef list row
 *         try:             # <<<<<<<<<<<<<<
 *             row = self.reader.next().rstrip().split('\t')
 *         except StopIteration:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "cyvcf/parser.pyx":1156
 *         cdef list row
 *         try:
 *             row = self.reader.next().rstrip().split('\t')             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             raise StopIteration
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->reader, __pyx_n_s__next); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__rstrip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_row = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1157
 *         try:
 *             row = self.reader.next().rstrip().split('\t')
 *         except StopIteration:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cyvcf.parser.Reader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "cyvcf/parser.pyx":1158
 *             row = self.reader.next().rstrip().split('\t')
 *         except StopIteration:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 * 
 *         #CHROM
 */
      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "cyvcf/parser.pyx":1161
 * 
 *         #CHROM
 *         cdef bytes chrom = row[0]             # <<<<<<<<<<<<<<
 *         if self._prepend_chr:
 *             chrom = 'chr' + chrom
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_chrom = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1162
 *         #CHROM
 *         cdef bytes chrom = row[0]
 *         if self._prepend_chr:             # <<<<<<<<<<<<<<
 *             chrom = 'chr' + chrom
 *         # POS
 */
  if (__pyx_v_self->_prepend_chr) {

    /* "cyvcf/parser.pyx":1163
 *         cdef bytes chrom = row[0]
 *         if self._prepend_chr:
 *             chrom = 'chr' + chrom             # <<<<<<<<<<<<<<
 *         # POS
 *         cdef int pos = int(row[1])
 */
    __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_n_s__chr), ((PyObject *)__pyx_v_chrom)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyBytes_CheckExact(__pyx_t_7))||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_chrom));
    __pyx_v_chrom = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "cyvcf/parser.pyx":1165
 *             chrom = 'chr' + chrom
 *         # POS
 *         cdef int pos = int(row[1])             # <<<<<<<<<<<<<<
 *         # ID
 *         cdef bytes id = row[2]
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_pos = __pyx_t_6;

  /* "cyvcf/parser.pyx":1167
 *         cdef int pos = int(row[1])
 *         # ID
 *         cdef bytes id = row[2]             # <<<<<<<<<<<<<<
 *         #REF
 *         cdef bytes ref = row[3]
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_id = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1169
 *         cdef bytes id = row[2]
 *         #REF
 *         cdef bytes ref = row[3]             # <<<<<<<<<<<<<<
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ref = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1171
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___map); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_alt = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1174
 *         #QUAL
 *         cdef object qual
 *         if row[5] == b'.':             # <<<<<<<<<<<<<<
 *             qual = None
 *         else:
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_b_33), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1175
 *         cdef object qual
 *         if row[5] == b'.':
 *             qual = None             # <<<<<<<<<<<<<<
 *         else:
 *             qual = float(row[5])
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_qual = Py_None;
    goto __pyx_L14;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":1177
 *             qual = None
 *         else:
 *             qual = float(row[5])             # <<<<<<<<<<<<<<
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 */
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_AsDouble(__pyx_t_5); if (unlikely(__pyx_t_9 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_qual = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L14:;

  /* "cyvcf/parser.pyx":1179
 *             qual = float(row[5])
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]             # <<<<<<<<<<<<<<
 *         if filt == b'PASS' or filt == b'.':
 *              filt = None
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_34), __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_v_filt = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1180
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 *         if filt == b'PASS' or filt == b'.':             # <<<<<<<<<<<<<<
 *              filt = None
 *         #INFO
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_filt, ((PyObject *)__pyx_n_b__PASS), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_8) {
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_filt, ((PyObject *)__pyx_kp_b_33), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = __pyx_t_10;
  } else {
    __pyx_t_11 = __pyx_t_8;
  }
  if (__pyx_t_11) {

    /* "cyvcf/parser.pyx":1181
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 *         if filt == b'PASS' or filt == b'.':
 *              filt = None             # <<<<<<<<<<<<<<
 *         #INFO
 *         cdef dict info = self._parse_info(row[7])
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF(__pyx_v_filt);
    __pyx_v_filt = Py_None;
    goto __pyx_L15;
  }
  __pyx_L15:;

  /* "cyvcf/parser.pyx":1183
 *              filt = None
 *         #INFO
 *         cdef dict info = self._parse_info(row[7])             # <<<<<<<<<<<<<<
 *         #FORMAT
 *         cdef bytes fmt
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parse_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __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 = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_info = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1186
 *         #FORMAT
 *         cdef bytes fmt
 *         try:             # <<<<<<<<<<<<<<
 *             fmt = row[8]
 *         except IndexError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "cyvcf/parser.pyx":1187
 *         cdef bytes fmt
 *         try:
 *             fmt = row[8]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             fmt = None
 */
      if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
      }
      __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
      __pyx_v_fmt = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L23_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1188
 *         try:
 *             fmt = row[8]
 *         except IndexError:             # <<<<<<<<<<<<<<
 *             fmt = None
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cyvcf.parser.Reader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_5);

      /* "cyvcf/parser.pyx":1189
 *             fmt = row[8]
 *         except IndexError:
 *             fmt = None             # <<<<<<<<<<<<<<
 * 
 *         self.curr_record = \
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF(((PyObject *)__pyx_v_fmt));
      __pyx_v_fmt = ((PyObject*)Py_None);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L17_exception_handled;
    }
    __pyx_L18_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L17_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    __pyx_L23_try_end:;
  }

  /* "cyvcf/parser.pyx":1192
 * 
 *         self.curr_record = \
 *              _Record(chrom, pos, id, ref, alt, qual, filt, info, fmt, self._sample_indexes)             # <<<<<<<<<<<<<<
 * 
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 */
  __pyx_t_5 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_chrom));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_chrom));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom));
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_id));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_id));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_id));
  __Pyx_INCREF(((PyObject *)__pyx_v_ref));
  PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_v_ref));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_ref));
  __Pyx_INCREF(((PyObject *)__pyx_v_alt));
  PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_v_alt));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_alt));
  __Pyx_INCREF(__pyx_v_qual);
  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_qual);
  __Pyx_GIVEREF(__pyx_v_qual);
  __Pyx_INCREF(__pyx_v_filt);
  PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_v_filt);
  __Pyx_GIVEREF(__pyx_v_filt);
  __Pyx_INCREF(((PyObject *)__pyx_v_info));
  PyTuple_SET_ITEM(__pyx_t_7, 7, ((PyObject *)__pyx_v_info));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_info));
  __Pyx_INCREF(((PyObject *)__pyx_v_fmt));
  PyTuple_SET_ITEM(__pyx_t_7, 8, ((PyObject *)__pyx_v_fmt));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fmt));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_sample_indexes));
  PyTuple_SET_ITEM(__pyx_t_7, 9, ((PyObject *)__pyx_v_self->_sample_indexes));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_sample_indexes));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Record)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1191
 *             fmt = None
 * 
 *         self.curr_record = \             # <<<<<<<<<<<<<<
 *              _Record(chrom, pos, id, ref, alt, qual, filt, info, fmt, self._sample_indexes)
 * 
 */
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->curr_record);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record));
  __pyx_v_self->curr_record = ((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1195
 * 
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 *         if fmt is not None:             # <<<<<<<<<<<<<<
 *             sample_info = self._parse_samples(row[9:], fmt)
 *             self.curr_record.samples = sample_info.samples
 */
  __pyx_t_11 = (__pyx_v_fmt != ((PyObject*)Py_None));
  if (__pyx_t_11) {

    /* "cyvcf/parser.pyx":1196
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 *         if fmt is not None:
 *             sample_info = self._parse_samples(row[9:], fmt)             # <<<<<<<<<<<<<<
 *             self.curr_record.samples = sample_info.samples
 *             self.curr_record.gt_bases = sample_info.gt_bases
 */
    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parse_samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_row), 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_7));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
    __Pyx_INCREF(((PyObject *)__pyx_v_fmt));
    PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_fmt));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_fmt));
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_sample_info = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1197
 *         if fmt is not None:
 *             sample_info = self._parse_samples(row[9:], fmt)
 *             self.curr_record.samples = sample_info.samples             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_bases = sample_info.gt_bases
 *             self.curr_record.gt_types = sample_info.gt_types
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->samples);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->samples));
    __pyx_v_self->curr_record->samples = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1198
 *             sample_info = self._parse_samples(row[9:], fmt)
 *             self.curr_record.samples = sample_info.samples
 *             self.curr_record.gt_bases = sample_info.gt_bases             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_types = sample_info.gt_types
 *             self.curr_record.gt_phases = sample_info.gt_phases
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_bases); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_bases);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_bases));
    __pyx_v_self->curr_record->gt_bases = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1199
 *             self.curr_record.samples = sample_info.samples
 *             self.curr_record.gt_bases = sample_info.gt_bases
 *             self.curr_record.gt_types = sample_info.gt_types             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_phases = sample_info.gt_phases
 *             self.curr_record.gt_depths = sample_info.gt_depths
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_types); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_types);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_types));
    __pyx_v_self->curr_record->gt_types = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1200
 *             self.curr_record.gt_bases = sample_info.gt_bases
 *             self.curr_record.gt_types = sample_info.gt_types
 *             self.curr_record.gt_phases = sample_info.gt_phases             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_depths = sample_info.gt_depths
 *             self.curr_record.gt_ref_depths = sample_info.gt_ref_depths
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_phases); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_phases);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_phases));
    __pyx_v_self->curr_record->gt_phases = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1201
 *             self.curr_record.gt_types = sample_info.gt_types
 *             self.curr_record.gt_phases = sample_info.gt_phases
 *             self.curr_record.gt_depths = sample_info.gt_depths             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_ref_depths = sample_info.gt_ref_depths
 *             self.curr_record.gt_alt_depths = sample_info.gt_alt_depths
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_depths); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_depths);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_depths));
    __pyx_v_self->curr_record->gt_depths = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1202
 *             self.curr_record.gt_phases = sample_info.gt_phases
 *             self.curr_record.gt_depths = sample_info.gt_depths
 *             self.curr_record.gt_ref_depths = sample_info.gt_ref_depths             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             self.curr_record.gt_quals = sample_info.gt_quals
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_ref_depths); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_ref_depths);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_ref_depths));
    __pyx_v_self->curr_record->gt_ref_depths = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1203
 *             self.curr_record.gt_depths = sample_info.gt_depths
 *             self.curr_record.gt_ref_depths = sample_info.gt_ref_depths
 *             self.curr_record.gt_alt_depths = sample_info.gt_alt_depths             # <<<<<<<<<<<<<<
 *             self.curr_record.gt_quals = sample_info.gt_quals
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_alt_depths); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_alt_depths);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_alt_depths));
    __pyx_v_self->curr_record->gt_alt_depths = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1204
 *             self.curr_record.gt_ref_depths = sample_info.gt_ref_depths
 *             self.curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             self.curr_record.gt_quals = sample_info.gt_quals             # <<<<<<<<<<<<<<
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref
 *             self.curr_record.num_het = sample_info.num_het
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_quals); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_quals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record->gt_quals));
    __pyx_v_self->curr_record->gt_quals = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cyvcf/parser.pyx":1205
 *             self.curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             self.curr_record.gt_quals = sample_info.gt_quals
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref             # <<<<<<<<<<<<<<
 *             self.curr_record.num_het = sample_info.num_het
 *             self.curr_record.num_hom_alt = sample_info.num_hom_alt
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_hom_ref); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->curr_record->num_hom_ref = __pyx_t_6;

    /* "cyvcf/parser.pyx":1206
 *             self.curr_record.gt_quals = sample_info.gt_quals
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref
 *             self.curr_record.num_het = sample_info.num_het             # <<<<<<<<<<<<<<
 *             self.curr_record.num_hom_alt = sample_info.num_hom_alt
 *             self.curr_record.num_unknown = sample_info.num_unknown
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_het); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->curr_record->num_het = __pyx_t_6;

    /* "cyvcf/parser.pyx":1207
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref
 *             self.curr_record.num_het = sample_info.num_het
 *             self.curr_record.num_hom_alt = sample_info.num_hom_alt             # <<<<<<<<<<<<<<
 *             self.curr_record.num_unknown = sample_info.num_unknown
 *             self.curr_record.num_called = sample_info.num_called
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_hom_alt); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->curr_record->num_hom_alt = __pyx_t_6;

    /* "cyvcf/parser.pyx":1208
 *             self.curr_record.num_het = sample_info.num_het
 *             self.curr_record.num_hom_alt = sample_info.num_hom_alt
 *             self.curr_record.num_unknown = sample_info.num_unknown             # <<<<<<<<<<<<<<
 *             self.curr_record.num_called = sample_info.num_called
 * 
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_unknown); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->curr_record->num_unknown = __pyx_t_6;

    /* "cyvcf/parser.pyx":1209
 *             self.curr_record.num_hom_alt = sample_info.num_hom_alt
 *             self.curr_record.num_unknown = sample_info.num_unknown
 *             self.curr_record.num_called = sample_info.num_called             # <<<<<<<<<<<<<<
 * 
 *         return self.curr_record
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_called); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_self->curr_record->num_called = __pyx_t_6;
    goto __pyx_L26;
  }
  __pyx_L26:;

  /* "cyvcf/parser.pyx":1211
 *             self.curr_record.num_called = sample_info.num_called
 * 
 *         return self.curr_record             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->curr_record));
  __pyx_r = ((PyObject *)__pyx_v_self->curr_record);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cyvcf.parser.Reader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_chrom);
  __Pyx_XDECREF(__pyx_v_id);
  __Pyx_XDECREF(__pyx_v_ref);
  __Pyx_XDECREF(__pyx_v_alt);
  __Pyx_XDECREF(__pyx_v_qual);
  __Pyx_XDECREF(__pyx_v_filt);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XDECREF(__pyx_v_sample_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_21parse(PyObject *__pyx_v_other, PyObject *__pyx_v_line); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_20parse[] = "Return the next record in the file.";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_21parse(PyObject *__pyx_v_other, PyObject *__pyx_v_line) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_20parse(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_other), ((PyObject *)__pyx_v_line));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1214
 * 
 * 
 *     def parse(other, line):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_20parse(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_other, PyObject *__pyx_v_line) {
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_chrom = 0;
  int __pyx_v_pos;
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_alt = 0;
  PyObject *__pyx_v_qual = 0;
  PyObject *__pyx_v_filt = 0;
  PyObject *__pyx_v_info = 0;
  PyObject *__pyx_v_fmt = 0;
  struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_curr_record = NULL;
  PyObject *__pyx_v_sample_info = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  double __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse", 0);

  /* "cyvcf/parser.pyx":1218
 * 
 *         #self._load_line(self.reader.next())
 *         cdef list row = line.split('\t')             # <<<<<<<<<<<<<<
 * 
 *         #CHROM
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_row = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1221
 * 
 *         #CHROM
 *         cdef bytes chrom = row[0]             # <<<<<<<<<<<<<<
 *         if other._prepend_chr:
 *             chrom = 'chr' + chrom
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_chrom = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1222
 *         #CHROM
 *         cdef bytes chrom = row[0]
 *         if other._prepend_chr:             # <<<<<<<<<<<<<<
 *             chrom = 'chr' + chrom
 *         # POS
 */
  if (__pyx_v_other->_prepend_chr) {

    /* "cyvcf/parser.pyx":1223
 *         cdef bytes chrom = row[0]
 *         if other._prepend_chr:
 *             chrom = 'chr' + chrom             # <<<<<<<<<<<<<<
 *         # POS
 *         cdef int pos = int(row[1])
 */
    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_n_s__chr), ((PyObject *)__pyx_v_chrom)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_chrom));
    __pyx_v_chrom = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":1225
 *             chrom = 'chr' + chrom
 *         # POS
 *         cdef int pos = int(row[1])             # <<<<<<<<<<<<<<
 *         # ID
 *         cdef bytes id = row[2]
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_pos = __pyx_t_3;

  /* "cyvcf/parser.pyx":1227
 *         cdef int pos = int(row[1])
 *         # ID
 *         cdef bytes id = row[2]             # <<<<<<<<<<<<<<
 *         #REF
 *         cdef bytes ref = row[3]
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_id = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1229
 *         cdef bytes id = row[2]
 *         #REF
 *         cdef bytes ref = row[3]             # <<<<<<<<<<<<<<
 *         #ALT
 *         cdef list alt = other._map(str, row[4].split(','))
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ref = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1231
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = other._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_other), __pyx_n_s___map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_alt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1234
 *         #QUAL
 *         cdef object qual
 *         if row[5] == b'.':             # <<<<<<<<<<<<<<
 *             qual = None
 *         else:
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_b_33), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":1235
 *         cdef object qual
 *         if row[5] == b'.':
 *             qual = None             # <<<<<<<<<<<<<<
 *         else:
 *             qual = float(row[5])
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_qual = Py_None;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":1237
 *             qual = None
 *         else:
 *             qual = float(row[5])             # <<<<<<<<<<<<<<
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 */
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_t_4); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_qual = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cyvcf/parser.pyx":1239
 *             qual = float(row[5])
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]             # <<<<<<<<<<<<<<
 *         if filt == b'PASS' or filt == b'.':
 *              filt = None
 */
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_34), __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_v_filt = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1240
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 *         if filt == b'PASS' or filt == b'.':             # <<<<<<<<<<<<<<
 *              filt = None
 *         #INFO
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_filt, ((PyObject *)__pyx_n_b__PASS), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_5) {
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_filt, ((PyObject *)__pyx_kp_b_33), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_5;
  }
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1241
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 *         if filt == b'PASS' or filt == b'.':
 *              filt = None             # <<<<<<<<<<<<<<
 *         #INFO
 *         cdef dict info = other._parse_info(row[7])
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF(__pyx_v_filt);
    __pyx_v_filt = Py_None;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "cyvcf/parser.pyx":1243
 *              filt = None
 *         #INFO
 *         cdef dict info = other._parse_info(row[7])             # <<<<<<<<<<<<<<
 *         #FORMAT
 *         cdef bytes fmt
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_other), __pyx_n_s___parse_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __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 = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_info = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1246
 *         #FORMAT
 *         cdef bytes fmt
 *         try:             # <<<<<<<<<<<<<<
 *             fmt = row[8]
 *         except IndexError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "cyvcf/parser.pyx":1247
 *         cdef bytes fmt
 *         try:
 *             fmt = row[8]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             fmt = None
 */
      if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
      }
      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
      __pyx_v_fmt = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L13_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1248
 *         try:
 *             fmt = row[8]
 *         except IndexError:             # <<<<<<<<<<<<<<
 *             fmt = None
 * 
 */
    __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_3) {
      __Pyx_AddTraceback("cyvcf.parser.Reader.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_4);

      /* "cyvcf/parser.pyx":1249
 *             fmt = row[8]
 *         except IndexError:
 *             fmt = None             # <<<<<<<<<<<<<<
 * 
 *         curr_record = \
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF(((PyObject *)__pyx_v_fmt));
      __pyx_v_fmt = ((PyObject*)Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L7_exception_handled;
    }
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    __pyx_L13_try_end:;
  }

  /* "cyvcf/parser.pyx":1252
 * 
 *         curr_record = \
 *              _Record(chrom, pos, id, ref, alt, qual, filt, info, fmt, other._sample_indexes)             # <<<<<<<<<<<<<<
 * 
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 */
  __pyx_t_4 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyTuple_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_chrom));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_chrom));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_id));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_id));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_id));
  __Pyx_INCREF(((PyObject *)__pyx_v_ref));
  PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_ref));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_ref));
  __Pyx_INCREF(((PyObject *)__pyx_v_alt));
  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_v_alt));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_alt));
  __Pyx_INCREF(__pyx_v_qual);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_qual);
  __Pyx_GIVEREF(__pyx_v_qual);
  __Pyx_INCREF(__pyx_v_filt);
  PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_filt);
  __Pyx_GIVEREF(__pyx_v_filt);
  __Pyx_INCREF(((PyObject *)__pyx_v_info));
  PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_v_info));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_info));
  __Pyx_INCREF(((PyObject *)__pyx_v_fmt));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_v_fmt));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fmt));
  __Pyx_INCREF(((PyObject *)__pyx_v_other->_sample_indexes));
  PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_v_other->_sample_indexes));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_other->_sample_indexes));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Record)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_curr_record = ((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1255
 * 
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 *         if fmt is not None:             # <<<<<<<<<<<<<<
 *             sample_info = other._parse_samples(row[9:], fmt)
 *             curr_record.samples = sample_info.samples
 */
  __pyx_t_8 = (__pyx_v_fmt != ((PyObject*)Py_None));
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1256
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 *         if fmt is not None:
 *             sample_info = other._parse_samples(row[9:], fmt)             # <<<<<<<<<<<<<<
 *             curr_record.samples = sample_info.samples
 *             curr_record.gt_bases = sample_info.gt_bases
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_other), __pyx_n_s___parse_samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_row), 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(((PyObject *)__pyx_v_fmt));
    PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_fmt));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_fmt));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v_sample_info = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1257
 *         if fmt is not None:
 *             sample_info = other._parse_samples(row[9:], fmt)
 *             curr_record.samples = sample_info.samples             # <<<<<<<<<<<<<<
 *             curr_record.gt_bases = sample_info.gt_bases
 *             curr_record.gt_types = sample_info.gt_types
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->samples);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->samples));
    __pyx_v_curr_record->samples = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1258
 *             sample_info = other._parse_samples(row[9:], fmt)
 *             curr_record.samples = sample_info.samples
 *             curr_record.gt_bases = sample_info.gt_bases             # <<<<<<<<<<<<<<
 *             curr_record.gt_types = sample_info.gt_types
 *             curr_record.gt_phases = sample_info.gt_phases
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_bases); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_bases);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_bases));
    __pyx_v_curr_record->gt_bases = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1259
 *             curr_record.samples = sample_info.samples
 *             curr_record.gt_bases = sample_info.gt_bases
 *             curr_record.gt_types = sample_info.gt_types             # <<<<<<<<<<<<<<
 *             curr_record.gt_phases = sample_info.gt_phases
 *             curr_record.gt_depths = sample_info.gt_depths
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_types); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_types);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_types));
    __pyx_v_curr_record->gt_types = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1260
 *             curr_record.gt_bases = sample_info.gt_bases
 *             curr_record.gt_types = sample_info.gt_types
 *             curr_record.gt_phases = sample_info.gt_phases             # <<<<<<<<<<<<<<
 *             curr_record.gt_depths = sample_info.gt_depths
 *             curr_record.gt_ref_depths = sample_info.gt_ref_depths
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_phases); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_phases);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_phases));
    __pyx_v_curr_record->gt_phases = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1261
 *             curr_record.gt_types = sample_info.gt_types
 *             curr_record.gt_phases = sample_info.gt_phases
 *             curr_record.gt_depths = sample_info.gt_depths             # <<<<<<<<<<<<<<
 *             curr_record.gt_ref_depths = sample_info.gt_ref_depths
 *             curr_record.gt_alt_depths = sample_info.gt_alt_depths
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_depths); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_depths);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_depths));
    __pyx_v_curr_record->gt_depths = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1262
 *             curr_record.gt_phases = sample_info.gt_phases
 *             curr_record.gt_depths = sample_info.gt_depths
 *             curr_record.gt_ref_depths = sample_info.gt_ref_depths             # <<<<<<<<<<<<<<
 *             curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             curr_record.gt_quals = sample_info.gt_quals
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_ref_depths); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_ref_depths);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_ref_depths));
    __pyx_v_curr_record->gt_ref_depths = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1263
 *             curr_record.gt_depths = sample_info.gt_depths
 *             curr_record.gt_ref_depths = sample_info.gt_ref_depths
 *             curr_record.gt_alt_depths = sample_info.gt_alt_depths             # <<<<<<<<<<<<<<
 *             curr_record.gt_quals = sample_info.gt_quals
 *             curr_record.num_hom_ref = sample_info.num_hom_ref
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_alt_depths); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_alt_depths);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_alt_depths));
    __pyx_v_curr_record->gt_alt_depths = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1264
 *             curr_record.gt_ref_depths = sample_info.gt_ref_depths
 *             curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             curr_record.gt_quals = sample_info.gt_quals             # <<<<<<<<<<<<<<
 *             curr_record.num_hom_ref = sample_info.num_hom_ref
 *             curr_record.num_het = sample_info.num_het
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__gt_quals); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_quals);
    __Pyx_DECREF(((PyObject *)__pyx_v_curr_record->gt_quals));
    __pyx_v_curr_record->gt_quals = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1265
 *             curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             curr_record.gt_quals = sample_info.gt_quals
 *             curr_record.num_hom_ref = sample_info.num_hom_ref             # <<<<<<<<<<<<<<
 *             curr_record.num_het = sample_info.num_het
 *             curr_record.num_hom_alt = sample_info.num_hom_alt
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_hom_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curr_record->num_hom_ref = __pyx_t_3;

    /* "cyvcf/parser.pyx":1266
 *             curr_record.gt_quals = sample_info.gt_quals
 *             curr_record.num_hom_ref = sample_info.num_hom_ref
 *             curr_record.num_het = sample_info.num_het             # <<<<<<<<<<<<<<
 *             curr_record.num_hom_alt = sample_info.num_hom_alt
 *             curr_record.num_unknown = sample_info.num_unknown
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_het); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curr_record->num_het = __pyx_t_3;

    /* "cyvcf/parser.pyx":1267
 *             curr_record.num_hom_ref = sample_info.num_hom_ref
 *             curr_record.num_het = sample_info.num_het
 *             curr_record.num_hom_alt = sample_info.num_hom_alt             # <<<<<<<<<<<<<<
 *             curr_record.num_unknown = sample_info.num_unknown
 *             curr_record.num_called = sample_info.num_called
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_hom_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curr_record->num_hom_alt = __pyx_t_3;

    /* "cyvcf/parser.pyx":1268
 *             curr_record.num_het = sample_info.num_het
 *             curr_record.num_hom_alt = sample_info.num_hom_alt
 *             curr_record.num_unknown = sample_info.num_unknown             # <<<<<<<<<<<<<<
 *             curr_record.num_called = sample_info.num_called
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_unknown); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curr_record->num_unknown = __pyx_t_3;

    /* "cyvcf/parser.pyx":1269
 *             curr_record.num_hom_alt = sample_info.num_hom_alt
 *             curr_record.num_unknown = sample_info.num_unknown
 *             curr_record.num_called = sample_info.num_called             # <<<<<<<<<<<<<<
 * 
 *         return curr_record
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_sample_info, __pyx_n_s__num_called); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curr_record->num_called = __pyx_t_3;
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "cyvcf/parser.pyx":1271
 *             curr_record.num_called = sample_info.num_called
 * 
 *         return curr_record             # <<<<<<<<<<<<<<
 * 
 *     def fetch(self, chrom, start, end=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_curr_record));
  __pyx_r = ((PyObject *)__pyx_v_curr_record);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser.Reader.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_chrom);
  __Pyx_XDECREF(__pyx_v_id);
  __Pyx_XDECREF(__pyx_v_ref);
  __Pyx_XDECREF(__pyx_v_alt);
  __Pyx_XDECREF(__pyx_v_qual);
  __Pyx_XDECREF(__pyx_v_filt);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XDECREF((PyObject *)__pyx_v_curr_record);
  __Pyx_XDECREF(__pyx_v_sample_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_23fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_22fetch[] = " fetch records from a Tabix indexed VCF, requires pysam\n            if start and end are specified, return iterator over positions\n            if end not specified, return individual ``_Call`` at start or None\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_23fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_chrom = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__chrom,&__pyx_n_s__start,&__pyx_n_s__end,0};
    PyObject* values[3] = {0,0,0};

    /* "cyvcf/parser.pyx":1273
 *         return curr_record
 * 
 *     def fetch(self, chrom, start, end=None):             # <<<<<<<<<<<<<<
 *         """ fetch records from a Tabix indexed VCF, requires pysam
 *             if start and end are specified, return iterator over positions
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chrom)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fetch", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_chrom = values[0];
    __pyx_v_start = values[1];
    __pyx_v_end = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fetch", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_22fetch(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_chrom, __pyx_v_start, __pyx_v_end);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_22fetch(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch", 0);
  __Pyx_INCREF(__pyx_v_chrom);
  __Pyx_INCREF(__pyx_v_start);

  /* "cyvcf/parser.pyx":1278
 *             if end not specified, return individual ``_Call`` at start or None
 *         """
 *         if not pysam:             # <<<<<<<<<<<<<<
 *             raise Exception('pysam not available, try "pip install pysam"?')
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pysam); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1279
 *         """
 *         if not pysam:
 *             raise Exception('pysam not available, try "pip install pysam"?')             # <<<<<<<<<<<<<<
 * 
 *         if not self.filename:
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":1281
 *             raise Exception('pysam not available, try "pip install pysam"?')
 * 
 *         if not self.filename:             # <<<<<<<<<<<<<<
 *             raise Exception('Please provide a filename (or a "normal" fsock)')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->filename); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1282
 * 
 *         if not self.filename:
 *             raise Exception('Please provide a filename (or a "normal" fsock)')             # <<<<<<<<<<<<<<
 * 
 *         if not self._tabix:
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "cyvcf/parser.pyx":1284
 *             raise Exception('Please provide a filename (or a "normal" fsock)')
 * 
 *         if not self._tabix:             # <<<<<<<<<<<<<<
 *             self._tabix = pysam.Tabixfile(self.filename)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_tabix); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1285
 * 
 *         if not self._tabix:
 *             self._tabix = pysam.Tabixfile(self.filename)             # <<<<<<<<<<<<<<
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pysam); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->filename);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->filename);
    __Pyx_GIVEREF(__pyx_v_self->filename);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_tabix);
    __Pyx_DECREF(__pyx_v_self->_tabix);
    __pyx_v_self->_tabix = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "cyvcf/parser.pyx":1287
 *             self._tabix = pysam.Tabixfile(self.filename)
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':             # <<<<<<<<<<<<<<
 *             chrom = chrom[3:]
 * 
 */
  if (__pyx_v_self->_prepend_chr) {
    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_chrom, 0, 3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__chr), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_3;
  } else {
    __pyx_t_2 = __pyx_v_self->_prepend_chr;
  }
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1288
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 *             chrom = chrom[3:]             # <<<<<<<<<<<<<<
 * 
 *         # not sure why tabix needs position -1
 */
    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_chrom, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_chrom);
    __pyx_v_chrom = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "cyvcf/parser.pyx":1291
 * 
 *         # not sure why tabix needs position -1
 *         start = start - 1             # <<<<<<<<<<<<<<
 * 
 *         if end is None:
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_start);
  __pyx_v_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1293
 *         start = start - 1
 * 
 *         if end is None:             # <<<<<<<<<<<<<<
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:
 */
  __pyx_t_2 = (__pyx_v_end == Py_None);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1294
 * 
 *         if end is None:
 *             self.reader = self._tabix.fetch(chrom, start, start+1)             # <<<<<<<<<<<<<<
 *             try:
 *                 return self.next()
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->_tabix, __pyx_n_s__fetch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_chrom);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom);
    __Pyx_GIVEREF(__pyx_v_chrom);
    __Pyx_INCREF(__pyx_v_start);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_start);
    __Pyx_GIVEREF(__pyx_v_start);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->reader);
    __Pyx_DECREF(__pyx_v_self->reader);
    __pyx_v_self->reader = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1295
 *         if end is None:
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:             # <<<<<<<<<<<<<<
 *                 return self.next()
 *             except StopIteration:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "cyvcf/parser.pyx":1296
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:
 *                 return self.next()             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 return None
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__next); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L12_try_return;
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L15_try_end;
      __pyx_L12_try_return:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L0;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":1297
 *             try:
 *                 return self.next()
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("cyvcf.parser.Reader.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_1);

        /* "cyvcf/parser.pyx":1298
 *                 return self.next()
 *             except StopIteration:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         self.reader = self._tabix.fetch(chrom, start, end)
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_None);
        __pyx_r = Py_None;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L11_except_return;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L9_exception_handled;
      }
      __pyx_L10_except_error:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L11_except_return:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L0;
      __pyx_L9_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L15_try_end:;
    }
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "cyvcf/parser.pyx":1300
 *                 return None
 * 
 *         self.reader = self._tabix.fetch(chrom, start, end)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->_tabix, __pyx_n_s__fetch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_chrom);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom);
  __Pyx_GIVEREF(__pyx_v_chrom);
  __Pyx_INCREF(__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  __Pyx_INCREF(__pyx_v_end);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_end);
  __Pyx_GIVEREF(__pyx_v_end);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->reader);
  __Pyx_DECREF(__pyx_v_self->reader);
  __pyx_v_self->reader = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1301
 * 
 *         self.reader = self._tabix.fetch(chrom, start, end)
 *         return self             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser.Reader.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_chrom);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_template = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,&__pyx_n_s__template,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__template)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_stream = values[1];
    __pyx_v_template = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer___init__(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_template);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1309
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.writer = csv.writer(stream, delimiter="\t")
 *         self.template = template
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_template) {
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cyvcf/parser.pyx":1310
 * 
 *     def __init__(self, stream, template):
 *         self.writer = csv.writer(stream, delimiter="\t")             # <<<<<<<<<<<<<<
 *         self.template = template
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__csv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__writer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_stream);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stream);
  __Pyx_GIVEREF(__pyx_v_stream);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__delimiter), ((PyObject *)__pyx_kp_s_39)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__writer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1311
 *     def __init__(self, stream, template):
 *         self.writer = csv.writer(stream, delimiter="\t")
 *         self.template = template             # <<<<<<<<<<<<<<
 * 
 *         for line in template.metadata.items():
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__template, __pyx_v_template) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1313
 *         self.template = template
 * 
 *         for line in template.metadata.items():             # <<<<<<<<<<<<<<
 *             stream.write('##%s=%s\n' % line)
 *         for line in template.infos.values():
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_template, __pyx_n_s__metadata); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_line);
    __pyx_v_line = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1314
 * 
 *         for line in template.metadata.items():
 *             stream.write('##%s=%s\n' % line)             # <<<<<<<<<<<<<<
 *         for line in template.infos.values():
 *             stream.write('##INFO=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_79), __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":1315
 *         for line in template.metadata.items():
 *             stream.write('##%s=%s\n' % line)
 *         for line in template.infos.values():             # <<<<<<<<<<<<<<
 *             stream.write('##INFO=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 *         for line in template.formats.values():
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_template, __pyx_n_s__infos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_line);
    __pyx_v_line = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":1316
 *             stream.write('##%s=%s\n' % line)
 *         for line in template.infos.values():
 *             stream.write('##INFO=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))             # <<<<<<<<<<<<<<
 *         for line in template.formats.values():
 *             stream.write('##FORMAT=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_80), __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_4));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1317
 *         for line in template.infos.values():
 *             stream.write('##INFO=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 *         for line in template.formats.values():             # <<<<<<<<<<<<<<
 *             stream.write('##FORMAT=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 *         for line in template.filters.values():
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_template, __pyx_n_s__formats); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF(__pyx_v_line);
    __pyx_v_line = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1318
 *             stream.write('##INFO=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 *         for line in template.formats.values():
 *             stream.write('##FORMAT=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))             # <<<<<<<<<<<<<<
 *         for line in template.filters.values():
 *             stream.write('##FILTER=<ID=%s,Description="%s">\n' % tuple(self._map(str, line)))
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___map); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_81), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1319
 *         for line in template.formats.values():
 *             stream.write('##FORMAT=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 *         for line in template.filters.values():             # <<<<<<<<<<<<<<
 *             stream.write('##FILTER=<ID=%s,Description="%s">\n' % tuple(self._map(str, line)))
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_template, __pyx_n_s__filters); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_line);
    __pyx_v_line = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1320
 *             stream.write('##FORMAT=<ID=%s,Number=%s,Type=%s,Description="%s">\n' % tuple(self._map(str, line)))
 *         for line in template.filters.values():
 *             stream.write('##FILTER=<ID=%s,Description="%s">\n' % tuple(self._map(str, line)))             # <<<<<<<<<<<<<<
 * 
 *         self._write_header()
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __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 = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_82), __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":1322
 *             stream.write('##FILTER=<ID=%s,Description="%s">\n' % tuple(self._map(str, line)))
 * 
 *         self._write_header()             # <<<<<<<<<<<<<<
 * 
 *     def _write_header(self):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___write_header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cyvcf.parser.Writer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_3_write_header(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_3_write_header = {__Pyx_NAMESTR("_write_header"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_3_write_header, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_3_write_header(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_write_header (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_2_write_header(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1324
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_2_write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_write_header", 0);

  /* "cyvcf/parser.pyx":1326
 *     def _write_header(self):
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)             # <<<<<<<<<<<<<<
 * 
 *     def write_record(self, record):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__writer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__writerow); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fixed_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__template); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser.Writer._write_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_5write_record(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Writer_4write_record[] = " write a record to the file ";
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_5write_record = {__Pyx_NAMESTR("write_record"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_5write_record, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Writer_4write_record)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_5write_record(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_record = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_record (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__record,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__record)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_record", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_record") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_record = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_record", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer.write_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_4write_record(__pyx_self, __pyx_v_self, __pyx_v_record);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1328
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 * 
 *     def write_record(self, record):             # <<<<<<<<<<<<<<
 *         """ write a record to the file """
 *         ffs = self._map(str, [record.CHROM, record.POS, record.ID, record.REF]) \
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_4write_record(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_record) {
  PyObject *__pyx_v_ffs = NULL;
  PyObject *__pyx_v_samples = NULL;
  PyObject *__pyx_v_sample = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write_record", 0);

  /* "cyvcf/parser.pyx":1330
 *     def write_record(self, record):
 *         """ write a record to the file """
 *         ffs = self._map(str, [record.CHROM, record.POS, record.ID, record.REF]) \             # <<<<<<<<<<<<<<
 *               + [self._format_alt(record.ALT), record.QUAL or '.', record.FILTER or '.',
 *                  self._format_info(record.INFO), record.FORMAT]
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__CHROM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__ID); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__REF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1331
 *         """ write a record to the file """
 *         ffs = self._map(str, [record.CHROM, record.POS, record.ID, record.REF]) \
 *               + [self._format_alt(record.ALT), record.QUAL or '.', record.FILTER or '.',             # <<<<<<<<<<<<<<
 *                  self._format_info(record.INFO), record.FORMAT]
 * 
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format_alt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__ALT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__QUAL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
    __pyx_t_5 = __pyx_kp_s_33;
  } else {
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__FILTER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
    __pyx_t_3 = __pyx_kp_s_33;
  } else {
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
  }

  /* "cyvcf/parser.pyx":1332
 *         ffs = self._map(str, [record.CHROM, record.POS, record.ID, record.REF]) \
 *               + [self._format_alt(record.ALT), record.QUAL or '.', record.FILTER or '.',
 *                  self._format_info(record.INFO), record.FORMAT]             # <<<<<<<<<<<<<<
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__INFO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_ffs = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":1334
 *                  self._format_info(record.INFO), record.FORMAT]
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)             # <<<<<<<<<<<<<<
 *             for sample in record.samples]
 *         self.writer.writerow(ffs + samples)
 */
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "cyvcf/parser.pyx":1335
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]             # <<<<<<<<<<<<<<
 *         self.writer.writerow(ffs + samples)
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_10(__pyx_t_6);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_sample);
    __pyx_v_sample = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1334
 *                  self._format_info(record.INFO), record.FORMAT]
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)             # <<<<<<<<<<<<<<
 *             for sample in record.samples]
 *         self.writer.writerow(ffs + samples)
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format_sample); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_sample);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_sample);
    __Pyx_GIVEREF(__pyx_v_sample);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_8, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = ((PyObject *)__pyx_t_8);
  __Pyx_INCREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_v_samples = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cyvcf/parser.pyx":1336
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]
 *         self.writer.writerow(ffs + samples)             # <<<<<<<<<<<<<<
 * 
 *     def _format_alt(self, alt):
 */
  __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__writer); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__writerow); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_v_ffs, ((PyObject *)__pyx_v_samples)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cyvcf.parser.Writer.write_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ffs);
  __Pyx_XDECREF(__pyx_v_samples);
  __Pyx_XDECREF(__pyx_v_sample);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_7_format_alt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_7_format_alt = {__Pyx_NAMESTR("_format_alt"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_7_format_alt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_7_format_alt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_alt = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_alt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__alt,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_format_alt", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_format_alt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_alt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_format_alt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_alt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_6_format_alt(__pyx_self, __pyx_v_self, __pyx_v_alt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1338
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_6_format_alt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_alt) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_alt", 0);

  /* "cyvcf/parser.pyx":1339
 * 
 *     def _format_alt(self, alt):
 *         return ','.join([x or '.' for x in alt])             # <<<<<<<<<<<<<<
 * 
 *     def _format_info(self, info):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_32), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
    __pyx_t_3 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_x); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_7) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
      __pyx_t_6 = __pyx_kp_s_33;
    } else {
      __Pyx_INCREF(__pyx_v_x);
      __pyx_t_6 = __pyx_v_x;
    }
    if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_alt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_9_format_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_9_format_info = {__Pyx_NAMESTR("_format_info"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_9_format_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_9_format_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_info = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__info,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_format_info", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_format_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_info = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_format_info", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_8_format_info(__pyx_self, __pyx_v_self, __pyx_v_info);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1341
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_8_format_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_info", 0);

  /* "cyvcf/parser.pyx":1342
 * 
 *     def _format_info(self, info):
 *         if not info:             # <<<<<<<<<<<<<<
 *             return '.'
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_info); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1343
 *     def _format_info(self, info):
 *         if not info:
 *             return '.'             # <<<<<<<<<<<<<<
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
    __pyx_r = ((PyObject *)__pyx_kp_s_33);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":1344
 *         if not info:
 *             return '.'
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])             # <<<<<<<<<<<<<<
 * 
 *     def _format_sample(self, fmt, sample):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_34), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_info, __pyx_n_s__items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __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 = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_10);
      #else
      __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
      index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_9;
    __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_v_y);
    __pyx_v_y = __pyx_t_10;
    __pyx_t_10 = 0;
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___stringify); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_y);
    __Pyx_GIVEREF(__pyx_v_y);
    __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_35), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_11_format_sample(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_11_format_sample = {__Pyx_NAMESTR("_format_sample"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_11_format_sample, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_11_format_sample(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_sample = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_sample (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__fmt,&__pyx_n_s__sample,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fmt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_format_sample", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sample)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_format_sample", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_format_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_fmt = values[1];
    __pyx_v_sample = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_format_sample", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_10_format_sample(__pyx_self, __pyx_v_self, __pyx_v_fmt, __pyx_v_sample);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5cyvcf_6parser_6Writer_14_format_sample_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "cyvcf/parser.pyx":1349
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_14_format_sample_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_3_genexpr->tp_new(__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5cyvcf_6parser_6Writer_14_format_sample_2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_sample.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5cyvcf_6parser_6Writer_14_format_sample_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fmt)) { __Pyx_RaiseClosureNameError("fmt"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fmt, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_v_f = __pyx_t_2;
    __pyx_t_2 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s___stringify); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample)) { __Pyx_RaiseClosureNameError("sample"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample, __pyx_n_s__data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "cyvcf/parser.pyx":1346
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])
 * 
 *     def _format_sample(self, fmt, sample):             # <<<<<<<<<<<<<<
 *         if sample.data["GT"] is None:
 *             return "./."
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_10_format_sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_sample) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_sample", 0);
  __pyx_cur_scope = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_2__format_sample->tp_new(__pyx_ptype_5cyvcf_6parser___pyx_scope_struct_2__format_sample, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_fmt = __pyx_v_fmt;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fmt);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fmt);
  __pyx_cur_scope->__pyx_v_sample = __pyx_v_sample;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sample);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sample);

  /* "cyvcf/parser.pyx":1347
 * 
 *     def _format_sample(self, fmt, sample):
 *         if sample.data["GT"] is None:             # <<<<<<<<<<<<<<
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_sample, __pyx_n_s__data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1348
 *     def _format_sample(self, fmt, sample):
 *         if sample.data["GT"] is None:
 *             return "./."             # <<<<<<<<<<<<<<
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
    __pyx_r = ((PyObject *)__pyx_kp_s_38);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":1349
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_36), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_pf_5cyvcf_6parser_6Writer_14_format_sample_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_13_stringify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_13_stringify = {__Pyx_NAMESTR("_stringify"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_13_stringify, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_13_stringify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_none = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_stringify (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__x,&__pyx_n_s__none,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s_33));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_stringify", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__none);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_stringify") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_x = values[1];
    __pyx_v_none = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_stringify", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._stringify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_12_stringify(__pyx_self, __pyx_v_self, __pyx_v_x, __pyx_v_none);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1351
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))
 * 
 *     def _stringify(self, x, none='.'):             # <<<<<<<<<<<<<<
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_12_stringify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_none) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_stringify", 0);

  /* "cyvcf/parser.pyx":1352
 * 
 *     def _stringify(self, x, none='.'):
 *         if type(x) == type([]):             # <<<<<<<<<<<<<<
 *             return ','.join(self._map(str, x, none))
 *         return str(x) if x is not None else none
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_x)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_t_1))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1353
 *     def _stringify(self, x, none='.'):
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))             # <<<<<<<<<<<<<<
 *         return str(x) if x is not None else none
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_32), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(__pyx_v_none);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_none);
    __Pyx_GIVEREF(__pyx_v_none);
    __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 = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":1354
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))
 *         return str(x) if x is not None else none             # <<<<<<<<<<<<<<
 * 
 *     def _map(self, func, iterable, none='.'):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = (__pyx_v_x != Py_None);
  if (__pyx_t_3) {
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_none);
    __pyx_t_5 = __pyx_v_none;
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser.Writer._stringify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_15_map(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Writer_14_map[] = "``map``, but make None values none.";
static PyMethodDef __pyx_mdef_5cyvcf_6parser_6Writer_15_map = {__Pyx_NAMESTR("_map"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_15_map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Writer_14_map)};
static PyObject *__pyx_pw_5cyvcf_6parser_6Writer_15_map(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_iterable = 0;
  PyObject *__pyx_v_none = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_map (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__func,&__pyx_n_s__iterable,&__pyx_n_s__none,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s_33));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_map", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_map", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__none);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_map") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_func = values[1];
    __pyx_v_iterable = values[2];
    __pyx_v_none = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_map", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Writer_14_map(__pyx_self, __pyx_v_self, __pyx_v_func, __pyx_v_iterable, __pyx_v_none);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1356
 *         return str(x) if x is not None else none
 * 
 *     def _map(self, func, iterable, none='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 */

static PyObject *__pyx_pf_5cyvcf_6parser_6Writer_14_map(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, PyObject *__pyx_v_none) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_map", 0);

  /* "cyvcf/parser.pyx":1358
 *     def _map(self, func, iterable, none='.'):
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none             # <<<<<<<<<<<<<<
 *                 for x in iterable]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":1359
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 * def __update_readme():
 */
  if (PyList_CheckExact(__pyx_v_iterable) || PyTuple_CheckExact(__pyx_v_iterable)) {
    __pyx_t_2 = __pyx_v_iterable; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_iterable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1358
 *     def _map(self, func, iterable, none='.'):
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none             # <<<<<<<<<<<<<<
 *                 for x in iterable]
 * 
 */
    __pyx_t_6 = (__pyx_v_x != Py_None);
    if (__pyx_t_6) {
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __pyx_t_8 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {

      /* "cyvcf/parser.pyx":1359
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 * def __update_readme():
 */
      __Pyx_INCREF(__pyx_v_none);
      __pyx_t_5 = __pyx_v_none;
    }
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cyvcf.parser.Writer._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_1__update_readme(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_5cyvcf_6parser_1__update_readme = {__Pyx_NAMESTR("__update_readme"), (PyCFunction)__pyx_pw_5cyvcf_6parser_1__update_readme, METH_NOARGS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5cyvcf_6parser_1__update_readme(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__update_readme (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser___update_readme(__pyx_self);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1361
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */

static PyObject *__pyx_pf_5cyvcf_6parser___update_readme(CYTHON_UNUSED PyObject *__pyx_self) {
  CYTHON_UNUSED PyObject *__pyx_v_sys = NULL;
  PyObject *__pyx_v_vcf = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__update_readme", 0);

  /* "cyvcf/parser.pyx":1362
 * 
 * def __update_readme():
 *     import sys, vcf             # <<<<<<<<<<<<<<
 *     file('README.rst', 'w').write(vcf.__doc__)
 * 
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sys = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__vcf), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_vcf = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1363
 * def __update_readme():
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)             # <<<<<<<<<<<<<<
 * 
 * # backwards compatibility
 */
  __pyx_t_1 = PyObject_Call(__pyx_builtin_file, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_vcf, __pyx_n_s____doc__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser.__update_readme", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sys);
  __Pyx_XDECREF(__pyx_v_vcf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_5cyvcf_6parser__Call(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser__Call *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser__Call *)o);
  p->sample = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_nums = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->site = ((struct __pyx_obj_5cyvcf_6parser__Record *)Py_None); Py_INCREF(Py_None);
  p->data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (__pyx_pw_5cyvcf_6parser_5_Call_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser__Call(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser__Call *p = (struct __pyx_obj_5cyvcf_6parser__Call *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->sample);
  Py_CLEAR(p->gt_nums);
  Py_CLEAR(p->site);
  Py_CLEAR(p->data);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser__Call(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser__Call *p = (struct __pyx_obj_5cyvcf_6parser__Call *)o;
  if (p->sample) {
    e = (*v)(p->sample, a); if (e) return e;
  }
  if (p->gt_nums) {
    e = (*v)(p->gt_nums, a); if (e) return e;
  }
  if (p->site) {
    e = (*v)(((PyObject*)p->site), a); if (e) return e;
  }
  if (p->data) {
    e = (*v)(p->data, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser__Call(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser__Call *p = (struct __pyx_obj_5cyvcf_6parser__Call *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->sample);
  p->sample = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_nums);
  p->gt_nums = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->site);
  p->site = ((struct __pyx_obj_5cyvcf_6parser__Record *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->data);
  p->data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_5cyvcf_6parser__Call(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_site(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_4site_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_sample(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_6sample_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_called(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_6called_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_4data_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_phased(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_6phased_1__get__(o);
}

static PyMethodDef __pyx_methods_5cyvcf_6parser__Call[] = {
  {__Pyx_NAMESTR("gt_bases"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_9gt_bases, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_8gt_bases)},
  {__Pyx_NAMESTR("gt_type"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_11gt_type, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_10gt_type)},
  {__Pyx_NAMESTR("gt_depth"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_13gt_depth, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_12gt_depth)},
  {__Pyx_NAMESTR("gt_ref_depth"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_15gt_ref_depth, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_14gt_ref_depth)},
  {__Pyx_NAMESTR("gt_alt_depth"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_17gt_alt_depth, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_16gt_alt_depth)},
  {__Pyx_NAMESTR("gt_qual"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_19gt_qual, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_18gt_qual)},
  {__Pyx_NAMESTR("is_variant"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_21is_variant, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_20is_variant)},
  {__Pyx_NAMESTR("is_het"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_23is_het, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_22is_het)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5cyvcf_6parser__Call[] = {
  {(char *)"site", __pyx_getprop_5cyvcf_6parser_5_Call_site, 0, __Pyx_DOCSTR(__pyx_k_86), 0},
  {(char *)"sample", __pyx_getprop_5cyvcf_6parser_5_Call_sample, 0, __Pyx_DOCSTR(__pyx_k_87), 0},
  {(char *)"called", __pyx_getprop_5cyvcf_6parser_5_Call_called, 0, 0, 0},
  {(char *)"data", __pyx_getprop_5cyvcf_6parser_5_Call_data, 0, 0, 0},
  {(char *)"phased", __pyx_getprop_5cyvcf_6parser_5_Call_phased, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__Call = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence__Call = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5cyvcf_6parser__Call, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__Call = {
  0, /*mp_length*/
  __pyx_pw_5cyvcf_6parser_5_Call_7__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__Call = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser__Call = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser._Call"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser__Call), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser__Call, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_5cyvcf_6parser_5_Call_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number__Call, /*tp_as_number*/
  &__pyx_tp_as_sequence__Call, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__Call, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__Call, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR(" A genotype call, a cell entry in a VCF file"), /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser__Call, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser__Call, /*tp_clear*/
  __pyx_pw_5cyvcf_6parser_5_Call_5__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser__Call, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5cyvcf_6parser__Call, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser__Call, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser__Record(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser__Record *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser__Record *)o);
  p->alleles = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->samples = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->ALT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_bases = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_phases = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_depths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_ref_depths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_alt_depths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gt_quals = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->CHROM = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->ID = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->REF = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->FORMAT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->FILTER = Py_None; Py_INCREF(Py_None);
  p->QUAL = Py_None; Py_INCREF(Py_None);
  p->INFO = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_sample_indexes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (__pyx_pw_5cyvcf_6parser_7_Record_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser__Record(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser__Record *p = (struct __pyx_obj_5cyvcf_6parser__Record *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->alleles);
  Py_CLEAR(p->samples);
  Py_CLEAR(p->ALT);
  Py_CLEAR(p->gt_bases);
  Py_CLEAR(p->gt_types);
  Py_CLEAR(p->gt_phases);
  Py_CLEAR(p->gt_depths);
  Py_CLEAR(p->gt_ref_depths);
  Py_CLEAR(p->gt_alt_depths);
  Py_CLEAR(p->gt_quals);
  Py_CLEAR(p->CHROM);
  Py_CLEAR(p->ID);
  Py_CLEAR(p->REF);
  Py_CLEAR(p->FORMAT);
  Py_CLEAR(p->FILTER);
  Py_CLEAR(p->QUAL);
  Py_CLEAR(p->INFO);
  Py_CLEAR(p->_sample_indexes);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser__Record(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser__Record *p = (struct __pyx_obj_5cyvcf_6parser__Record *)o;
  if (p->alleles) {
    e = (*v)(p->alleles, a); if (e) return e;
  }
  if (p->samples) {
    e = (*v)(p->samples, a); if (e) return e;
  }
  if (p->ALT) {
    e = (*v)(p->ALT, a); if (e) return e;
  }
  if (p->gt_bases) {
    e = (*v)(p->gt_bases, a); if (e) return e;
  }
  if (p->gt_types) {
    e = (*v)(p->gt_types, a); if (e) return e;
  }
  if (p->gt_phases) {
    e = (*v)(p->gt_phases, a); if (e) return e;
  }
  if (p->gt_depths) {
    e = (*v)(p->gt_depths, a); if (e) return e;
  }
  if (p->gt_ref_depths) {
    e = (*v)(p->gt_ref_depths, a); if (e) return e;
  }
  if (p->gt_alt_depths) {
    e = (*v)(p->gt_alt_depths, a); if (e) return e;
  }
  if (p->gt_quals) {
    e = (*v)(p->gt_quals, a); if (e) return e;
  }
  if (p->CHROM) {
    e = (*v)(p->CHROM, a); if (e) return e;
  }
  if (p->ID) {
    e = (*v)(p->ID, a); if (e) return e;
  }
  if (p->REF) {
    e = (*v)(p->REF, a); if (e) return e;
  }
  if (p->FORMAT) {
    e = (*v)(p->FORMAT, a); if (e) return e;
  }
  if (p->FILTER) {
    e = (*v)(p->FILTER, a); if (e) return e;
  }
  if (p->QUAL) {
    e = (*v)(p->QUAL, a); if (e) return e;
  }
  if (p->INFO) {
    e = (*v)(p->INFO, a); if (e) return e;
  }
  if (p->_sample_indexes) {
    e = (*v)(p->_sample_indexes, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser__Record(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser__Record *p = (struct __pyx_obj_5cyvcf_6parser__Record *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->alleles);
  p->alleles = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->samples);
  p->samples = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->ALT);
  p->ALT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_bases);
  p->gt_bases = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_types);
  p->gt_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_phases);
  p->gt_phases = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_depths);
  p->gt_depths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_ref_depths);
  p->gt_ref_depths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_alt_depths);
  p->gt_alt_depths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gt_quals);
  p->gt_quals = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->CHROM);
  p->CHROM = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->ID);
  p->ID = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->REF);
  p->REF = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->FORMAT);
  p->FORMAT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->FILTER);
  p->FILTER = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->QUAL);
  p->QUAL = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->INFO);
  p->INFO = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_sample_indexes);
  p->_sample_indexes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_CHROM(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_5CHROM_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_POS(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_3POS_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_ID(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_2ID_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_REF(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_3REF_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_ALT(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_3ALT_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_QUAL(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_4QUAL_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_INFO(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_4INFO_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_FILTER(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_6FILTER_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_FORMAT(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_6FORMAT_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_start(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_5start_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_end(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_3end_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_alleles(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_7alleles_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_samples(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_7samples_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_bases(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_types(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_phases(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_depths(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_ref_depths(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_alt_depths(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_quals(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_num_hom_ref(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_ref_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_num_het(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_7num_het_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_num_hom_alt(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_alt_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_num_unknown(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_11num_unknown_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_num_called(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_10num_called_1__get__(o);
}

static PyMethodDef __pyx_methods_5cyvcf_6parser__Record[] = {
  {__Pyx_NAMESTR("_format_alt"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_7_format_alt, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_format_qual"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_9_format_qual, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_format_info"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_11_format_info, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_format_sample"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_13_format_sample, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_stringify"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_15_stringify, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_map"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_17_map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_16_map)},
  {__Pyx_NAMESTR("add_format"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_23add_format, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("add_filter"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_25add_filter, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("add_info"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_27add_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("genotype"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_29genotype, METH_O, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_28genotype)},
  {__Pyx_NAMESTR("call_rate"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_31call_rate, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_30call_rate)},
  {__Pyx_NAMESTR("aaf"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_33aaf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_32aaf)},
  {__Pyx_NAMESTR("nucl_diversity"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_35nucl_diversity, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_34nucl_diversity)},
  {__Pyx_NAMESTR("get_hom_refs"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_37get_hom_refs, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_36get_hom_refs)},
  {__Pyx_NAMESTR("get_hom_alts"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_39get_hom_alts, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_38get_hom_alts)},
  {__Pyx_NAMESTR("get_hets"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_41get_hets, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_40get_hets)},
  {__Pyx_NAMESTR("get_unknowns"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_43get_unknowns, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_42get_unknowns)},
  {__Pyx_NAMESTR("is_snp"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_45is_snp, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_44is_snp)},
  {__Pyx_NAMESTR("is_indel"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_47is_indel, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_46is_indel)},
  {__Pyx_NAMESTR("is_sv"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_49is_sv, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_48is_sv)},
  {__Pyx_NAMESTR("is_transition"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_51is_transition, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_50is_transition)},
  {__Pyx_NAMESTR("is_deletion"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_53is_deletion, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_52is_deletion)},
  {__Pyx_NAMESTR("var_type"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_55var_type, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_54var_type)},
  {__Pyx_NAMESTR("var_subtype"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_57var_subtype, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_56var_subtype)},
  {__Pyx_NAMESTR("sv_end"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_59sv_end, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_58sv_end)},
  {__Pyx_NAMESTR("is_sv_precise"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_61is_sv_precise, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_60is_sv_precise)},
  {__Pyx_NAMESTR("is_monomorphic"), (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_63is_monomorphic, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_7_Record_62is_monomorphic)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5cyvcf_6parser__Record[] = {
  {(char *)"CHROM", __pyx_getprop_5cyvcf_6parser_7_Record_CHROM, 0, 0, 0},
  {(char *)"POS", __pyx_getprop_5cyvcf_6parser_7_Record_POS, 0, 0, 0},
  {(char *)"ID", __pyx_getprop_5cyvcf_6parser_7_Record_ID, 0, 0, 0},
  {(char *)"REF", __pyx_getprop_5cyvcf_6parser_7_Record_REF, 0, 0, 0},
  {(char *)"ALT", __pyx_getprop_5cyvcf_6parser_7_Record_ALT, 0, 0, 0},
  {(char *)"QUAL", __pyx_getprop_5cyvcf_6parser_7_Record_QUAL, 0, 0, 0},
  {(char *)"INFO", __pyx_getprop_5cyvcf_6parser_7_Record_INFO, 0, 0, 0},
  {(char *)"FILTER", __pyx_getprop_5cyvcf_6parser_7_Record_FILTER, 0, 0, 0},
  {(char *)"FORMAT", __pyx_getprop_5cyvcf_6parser_7_Record_FORMAT, 0, 0, 0},
  {(char *)"start", __pyx_getprop_5cyvcf_6parser_7_Record_start, 0, __Pyx_DOCSTR(__pyx_k_88), 0},
  {(char *)"end", __pyx_getprop_5cyvcf_6parser_7_Record_end, 0, __Pyx_DOCSTR(__pyx_k_89), 0},
  {(char *)"alleles", __pyx_getprop_5cyvcf_6parser_7_Record_alleles, 0, __Pyx_DOCSTR(__pyx_k_90), 0},
  {(char *)"samples", __pyx_getprop_5cyvcf_6parser_7_Record_samples, 0, __Pyx_DOCSTR(__pyx_k_91), 0},
  {(char *)"gt_bases", __pyx_getprop_5cyvcf_6parser_7_Record_gt_bases, 0, __Pyx_DOCSTR(__pyx_k_92), 0},
  {(char *)"gt_types", __pyx_getprop_5cyvcf_6parser_7_Record_gt_types, 0, __Pyx_DOCSTR(__pyx_k_93), 0},
  {(char *)"gt_phases", __pyx_getprop_5cyvcf_6parser_7_Record_gt_phases, 0, __Pyx_DOCSTR(__pyx_k_94), 0},
  {(char *)"gt_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_depths, 0, __Pyx_DOCSTR(__pyx_k_95), 0},
  {(char *)"gt_ref_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_ref_depths, 0, __Pyx_DOCSTR(__pyx_k_96), 0},
  {(char *)"gt_alt_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_alt_depths, 0, __Pyx_DOCSTR(__pyx_k_97), 0},
  {(char *)"gt_quals", __pyx_getprop_5cyvcf_6parser_7_Record_gt_quals, 0, __Pyx_DOCSTR(__pyx_k_98), 0},
  {(char *)"num_hom_ref", __pyx_getprop_5cyvcf_6parser_7_Record_num_hom_ref, 0, __Pyx_DOCSTR(__pyx_k_99), 0},
  {(char *)"num_het", __pyx_getprop_5cyvcf_6parser_7_Record_num_het, 0, __Pyx_DOCSTR(__pyx_k_100), 0},
  {(char *)"num_hom_alt", __pyx_getprop_5cyvcf_6parser_7_Record_num_hom_alt, 0, __Pyx_DOCSTR(__pyx_k_101), 0},
  {(char *)"num_unknown", __pyx_getprop_5cyvcf_6parser_7_Record_num_unknown, 0, __Pyx_DOCSTR(__pyx_k_102), 0},
  {(char *)"num_called", __pyx_getprop_5cyvcf_6parser_7_Record_num_called, 0, __Pyx_DOCSTR(__pyx_k_103), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__Record = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence__Record = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__Record = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__Record = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser__Record = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser._Record"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser__Record), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser__Record, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_5cyvcf_6parser_7_Record_21__cmp__, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_5cyvcf_6parser_7_Record_19__repr__, /*tp_repr*/
  &__pyx_tp_as_number__Record, /*tp_as_number*/
  &__pyx_tp_as_sequence__Record, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__Record, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__Record, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR(" A set of calls at a site.  Equivalent to a line in a VCF file.\n\n        The standard VCF fields: \n        CHROM, POS, ID, \n        REF, ALT, QUAL, \n        FILTER, INFO, & FORMAT are available as properties.\n\n        The list of genotype calls is in the ``samples`` property.\n    "), /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser__Record, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser__Record, /*tp_clear*/
  __pyx_pw_5cyvcf_6parser_7_Record_3__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5cyvcf_6parser_7_Record_5__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser__Record, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5cyvcf_6parser__Record, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser__Record, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser_Reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser_Reader *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser_Reader *)o);
  p->_col_defn_line = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->reader = Py_None; Py_INCREF(Py_None);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->infos = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->filters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->formats = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_sample_indexes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_header_lines = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->samples = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->samp_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_tabix = Py_None; Py_INCREF(Py_None);
  p->filename = Py_None; Py_INCREF(Py_None);
  p->curr_record = ((struct __pyx_obj_5cyvcf_6parser__Record *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser_Reader(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser_Reader *p = (struct __pyx_obj_5cyvcf_6parser_Reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_col_defn_line);
  Py_CLEAR(p->reader);
  Py_CLEAR(p->metadata);
  Py_CLEAR(p->infos);
  Py_CLEAR(p->filters);
  Py_CLEAR(p->formats);
  Py_CLEAR(p->_sample_indexes);
  Py_CLEAR(p->_header_lines);
  Py_CLEAR(p->samples);
  Py_CLEAR(p->samp_data);
  Py_CLEAR(p->_tabix);
  Py_CLEAR(p->filename);
  Py_CLEAR(p->curr_record);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser_Reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser_Reader *p = (struct __pyx_obj_5cyvcf_6parser_Reader *)o;
  if (p->_col_defn_line) {
    e = (*v)(p->_col_defn_line, a); if (e) return e;
  }
  if (p->reader) {
    e = (*v)(p->reader, a); if (e) return e;
  }
  if (p->metadata) {
    e = (*v)(p->metadata, a); if (e) return e;
  }
  if (p->infos) {
    e = (*v)(p->infos, a); if (e) return e;
  }
  if (p->filters) {
    e = (*v)(p->filters, a); if (e) return e;
  }
  if (p->formats) {
    e = (*v)(p->formats, a); if (e) return e;
  }
  if (p->_sample_indexes) {
    e = (*v)(p->_sample_indexes, a); if (e) return e;
  }
  if (p->_header_lines) {
    e = (*v)(p->_header_lines, a); if (e) return e;
  }
  if (p->samples) {
    e = (*v)(p->samples, a); if (e) return e;
  }
  if (p->samp_data) {
    e = (*v)(p->samp_data, a); if (e) return e;
  }
  if (p->_tabix) {
    e = (*v)(p->_tabix, a); if (e) return e;
  }
  if (p->filename) {
    e = (*v)(p->filename, a); if (e) return e;
  }
  if (p->curr_record) {
    e = (*v)(((PyObject*)p->curr_record), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser_Reader(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser_Reader *p = (struct __pyx_obj_5cyvcf_6parser_Reader *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->_col_defn_line);
  p->_col_defn_line = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->reader);
  p->reader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->metadata);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->infos);
  p->infos = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->filters);
  p->filters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->formats);
  p->formats = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_sample_indexes);
  p->_sample_indexes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_header_lines);
  p->_header_lines = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->samples);
  p->samples = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->samp_data);
  p->samp_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_tabix);
  p->_tabix = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->filename);
  p->filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->curr_record);
  p->curr_record = ((struct __pyx_obj_5cyvcf_6parser__Record *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_filename(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_8filename_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_samples(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_7samples_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_formats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_7formats_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_infos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_5infos_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_filters(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_7filters_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_8metadata_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_raw_header(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_10raw_header_1__get__(o);
}

static PyMethodDef __pyx_methods_5cyvcf_6parser_Reader[] = {
  {__Pyx_NAMESTR("seek"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_5seek, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("tell"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_7tell, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_parse_metainfo"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_9_parse_metainfo, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_8_parse_metainfo)},
  {__Pyx_NAMESTR("_map"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_11_map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_10_map)},
  {__Pyx_NAMESTR("_parse_info"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_13_parse_info, METH_O, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_12_parse_info)},
  {__Pyx_NAMESTR("_parse_samples"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_15_parse_samples, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_14_parse_samples)},
  {__Pyx_NAMESTR("_parse_sample"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_17_parse_sample, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_19__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_18__next__)},
  {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_21parse, METH_O, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_20parse)},
  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_23fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_6Reader_22fetch)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5cyvcf_6parser_Reader[] = {
  {(char *)"filename", __pyx_getprop_5cyvcf_6parser_6Reader_filename, 0, __Pyx_DOCSTR(__pyx_k_104), 0},
  {(char *)"samples", __pyx_getprop_5cyvcf_6parser_6Reader_samples, 0, __Pyx_DOCSTR(__pyx_k_105), 0},
  {(char *)"formats", __pyx_getprop_5cyvcf_6parser_6Reader_formats, 0, __Pyx_DOCSTR(__pyx_k_106), 0},
  {(char *)"infos", __pyx_getprop_5cyvcf_6parser_6Reader_infos, 0, __Pyx_DOCSTR(__pyx_k_107), 0},
  {(char *)"filters", __pyx_getprop_5cyvcf_6parser_6Reader_filters, 0, __Pyx_DOCSTR(__pyx_k_108), 0},
  {(char *)"metadata", __pyx_getprop_5cyvcf_6parser_6Reader_metadata, 0, __Pyx_DOCSTR(__pyx_k_109), 0},
  {(char *)"raw_header", __pyx_getprop_5cyvcf_6parser_6Reader_raw_header, 0, __Pyx_DOCSTR(__pyx_k_110), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Reader = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Reader = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Reader = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Reader = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser_Reader = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser.Reader"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser_Reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser_Reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Reader, /*tp_as_number*/
  &__pyx_tp_as_sequence_Reader, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Reader, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Reader, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR(" Reader for a VCF v 4.1 file, an iterator returning ``_Record objects`` "), /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser_Reader, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser_Reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5cyvcf_6parser_6Reader_3__iter__, /*tp_iter*/
  __pyx_pw_5cyvcf_6parser_6Reader_19__next__, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser_Reader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5cyvcf_6parser_Reader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5cyvcf_6parser_6Reader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser_Reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct___format_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)o);
  p->__pyx_v_sample = 0;
  p->__pyx_v_self = 0;
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct___format_sample(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_sample);
  Py_CLEAR(p->__pyx_v_self);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct___format_sample(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)o;
  if (p->__pyx_v_sample) {
    e = (*v)(p->__pyx_v_sample, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct___format_sample(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_sample);
  p->__pyx_v_sample = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5cyvcf_6parser__Record *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5cyvcf_6parser___pyx_scope_struct___format_sample[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct___format_sample = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct___format_sample = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct___format_sample = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct___format_sample = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser___pyx_scope_struct___format_sample = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser.__pyx_scope_struct___format_sample"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct___format_sample, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct___format_sample, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct___format_sample, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct___format_sample, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct___format_sample, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct___format_sample, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct___format_sample, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser___pyx_scope_struct___format_sample, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser___pyx_scope_struct___format_sample, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_f = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5cyvcf_6parser___pyx_scope_struct_1_genexpr[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser.__pyx_scope_struct_1_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct_1_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser___pyx_scope_struct_1_genexpr, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_2__format_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)o);
  p->__pyx_v_fmt = 0;
  p->__pyx_v_sample = 0;
  p->__pyx_v_self = 0;
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct_2__format_sample(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fmt);
  Py_CLEAR(p->__pyx_v_sample);
  Py_CLEAR(p->__pyx_v_self);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct_2__format_sample(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)o;
  if (p->__pyx_v_fmt) {
    e = (*v)(p->__pyx_v_fmt, a); if (e) return e;
  }
  if (p->__pyx_v_sample) {
    e = (*v)(p->__pyx_v_sample, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct_2__format_sample(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_fmt);
  p->__pyx_v_fmt = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_sample);
  p->__pyx_v_sample = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5cyvcf_6parser___pyx_scope_struct_2__format_sample[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_2__format_sample = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_2__format_sample = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_2__format_sample = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_2__format_sample = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser___pyx_scope_struct_2__format_sample = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser.__pyx_scope_struct_2__format_sample"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct_2__format_sample, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct_2__format_sample, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_2__format_sample, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_2__format_sample, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_2__format_sample, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct_2__format_sample, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct_2__format_sample, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser___pyx_scope_struct_2__format_sample, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_2__format_sample, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_f = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  PyObject_GC_Track(o);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5cyvcf_6parser___pyx_scope_struct_3_genexpr[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_3_genexpr = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_3_genexpr = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_3_genexpr = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_3_genexpr = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_5cyvcf_6parser___pyx_scope_struct_3_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cyvcf.parser.__pyx_scope_struct_3_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5cyvcf_6parser___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct_3_genexpr, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_3_genexpr, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_3_genexpr, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_3_genexpr, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5cyvcf_6parser___pyx_scope_struct_3_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5cyvcf_6parser___pyx_scope_struct_3_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5cyvcf_6parser___pyx_scope_struct_3_genexpr, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_3_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    __Pyx_NAMESTR("parser"),
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 1},
  {&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0},
  {&__pyx_kp_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 0},
  {&__pyx_n_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 1},
  {&__pyx_n_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 1},
  {&__pyx_n_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 1},
  {&__pyx_n_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 1},
  {&__pyx_n_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 1},
  {&__pyx_n_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 1},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0},
  {&__pyx_kp_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 0},
  {&__pyx_n_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 1},
  {&__pyx_n_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 1},
  {&__pyx_n_s_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 1, 1},
  {&__pyx_n_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 1},
  {&__pyx_n_s_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 1},
  {&__pyx_n_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 1},
  {&__pyx_n_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 1},
  {&__pyx_n_s_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 1, 1},
  {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
  {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_kp_b_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0, 0},
  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
  {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
  {&__pyx_kp_b_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 0, 0},
  {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
  {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
  {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
  {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
  {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
  {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0},
  {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0},
  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
  {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0},
  {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
  {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0},
  {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0},
  {&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0},
  {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
  {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0},
  {&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
  {&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
  {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0},
  {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0},
  {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
  {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
  {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
  {&__pyx_n_b__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 0, 1},
  {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
  {&__pyx_n_s__AA, __pyx_k__AA, sizeof(__pyx_k__AA), 0, 0, 1, 1},
  {&__pyx_n_s__AC, __pyx_k__AC, sizeof(__pyx_k__AC), 0, 0, 1, 1},
  {&__pyx_n_s__AD, __pyx_k__AD, sizeof(__pyx_k__AD), 0, 0, 1, 1},
  {&__pyx_n_s__AF, __pyx_k__AF, sizeof(__pyx_k__AF), 0, 0, 1, 1},
  {&__pyx_n_s__ALT, __pyx_k__ALT, sizeof(__pyx_k__ALT), 0, 0, 1, 1},
  {&__pyx_n_s__AN, __pyx_k__AN, sizeof(__pyx_k__AN), 0, 0, 1, 1},
  {&__pyx_n_s__AO, __pyx_k__AO, sizeof(__pyx_k__AO), 0, 0, 1, 1},
  {&__pyx_n_s__BND, __pyx_k__BND, sizeof(__pyx_k__BND), 0, 0, 1, 1},
  {&__pyx_n_s__BQ, __pyx_k__BQ, sizeof(__pyx_k__BQ), 0, 0, 1, 1},
  {&__pyx_n_b__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 0, 1},
  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
  {&__pyx_n_s__CHROM, __pyx_k__CHROM, sizeof(__pyx_k__CHROM), 0, 0, 1, 1},
  {&__pyx_n_s__CIGAR, __pyx_k__CIGAR, sizeof(__pyx_k__CIGAR), 0, 0, 1, 1},
  {&__pyx_n_s__DB, __pyx_k__DB, sizeof(__pyx_k__DB), 0, 0, 1, 1},
  {&__pyx_n_s__DP, __pyx_k__DP, sizeof(__pyx_k__DP), 0, 0, 1, 1},
  {&__pyx_n_s__END, __pyx_k__END, sizeof(__pyx_k__END), 0, 0, 1, 1},
  {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
  {&__pyx_n_s__FILTER, __pyx_k__FILTER, sizeof(__pyx_k__FILTER), 0, 0, 1, 1},
  {&__pyx_n_s__FORMAT, __pyx_k__FORMAT, sizeof(__pyx_k__FORMAT), 0, 0, 1, 1},
  {&__pyx_n_s__FT, __pyx_k__FT, sizeof(__pyx_k__FT), 0, 0, 1, 1},
  {&__pyx_n_s__Filter, __pyx_k__Filter, sizeof(__pyx_k__Filter), 0, 0, 1, 1},
  {&__pyx_n_b__Flag, __pyx_k__Flag, sizeof(__pyx_k__Flag), 0, 0, 0, 1},
  {&__pyx_n_s__Flag, __pyx_k__Flag, sizeof(__pyx_k__Flag), 0, 0, 1, 1},
  {&__pyx_n_b__Float, __pyx_k__Float, sizeof(__pyx_k__Float), 0, 0, 0, 1},
  {&__pyx_n_s__Float, __pyx_k__Float, sizeof(__pyx_k__Float), 0, 0, 1, 1},
  {&__pyx_n_s__Format, __pyx_k__Format, sizeof(__pyx_k__Format), 0, 0, 1, 1},
  {&__pyx_n_b__G, __pyx_k__G, sizeof(__pyx_k__G), 0, 0, 0, 1},
  {&__pyx_n_s__G, __pyx_k__G, sizeof(__pyx_k__G), 0, 0, 1, 1},
  {&__pyx_n_s__GL, __pyx_k__GL, sizeof(__pyx_k__GL), 0, 0, 1, 1},
  {&__pyx_n_s__GQ, __pyx_k__GQ, sizeof(__pyx_k__GQ), 0, 0, 1, 1},
  {&__pyx_n_s__GT, __pyx_k__GT, sizeof(__pyx_k__GT), 0, 0, 1, 1},
  {&__pyx_n_s__GzipFile, __pyx_k__GzipFile, sizeof(__pyx_k__GzipFile), 0, 0, 1, 1},
  {&__pyx_n_s__H2, __pyx_k__H2, sizeof(__pyx_k__H2), 0, 0, 1, 1},
  {&__pyx_n_s__HET, __pyx_k__HET, sizeof(__pyx_k__HET), 0, 0, 1, 1},
  {&__pyx_n_s__HOM_ALT, __pyx_k__HOM_ALT, sizeof(__pyx_k__HOM_ALT), 0, 0, 1, 1},
  {&__pyx_n_s__HOM_REF, __pyx_k__HOM_REF, sizeof(__pyx_k__HOM_REF), 0, 0, 1, 1},
  {&__pyx_n_s__HQ, __pyx_k__HQ, sizeof(__pyx_k__HQ), 0, 0, 1, 1},
  {&__pyx_n_s__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 0, 1, 1},
  {&__pyx_n_s__IMPRECISE, __pyx_k__IMPRECISE, sizeof(__pyx_k__IMPRECISE), 0, 0, 1, 1},
  {&__pyx_n_s__INFO, __pyx_k__INFO, sizeof(__pyx_k__INFO), 0, 0, 1, 1},
  {&__pyx_n_s__ImportError, __pyx_k__ImportError, sizeof(__pyx_k__ImportError), 0, 0, 1, 1},
  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
  {&__pyx_n_s__Info, __pyx_k__Info, sizeof(__pyx_k__Info), 0, 0, 1, 1},
  {&__pyx_n_b__Integer, __pyx_k__Integer, sizeof(__pyx_k__Integer), 0, 0, 0, 1},
  {&__pyx_n_s__Integer, __pyx_k__Integer, sizeof(__pyx_k__Integer), 0, 0, 1, 1},
  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
  {&__pyx_n_s__MQ, __pyx_k__MQ, sizeof(__pyx_k__MQ), 0, 0, 1, 1},
  {&__pyx_n_s__MQ0, __pyx_k__MQ0, sizeof(__pyx_k__MQ0), 0, 0, 1, 1},
  {&__pyx_n_s__NS, __pyx_k__NS, sizeof(__pyx_k__NS), 0, 0, 1, 1},
  {&__pyx_n_s__Numeric, __pyx_k__Numeric, sizeof(__pyx_k__Numeric), 0, 0, 1, 1},
  {&__pyx_n_b__PASS, __pyx_k__PASS, sizeof(__pyx_k__PASS), 0, 0, 0, 1},
  {&__pyx_n_s__POS, __pyx_k__POS, sizeof(__pyx_k__POS), 0, 0, 1, 1},
  {&__pyx_n_s__QUAL, __pyx_k__QUAL, sizeof(__pyx_k__QUAL), 0, 0, 1, 1},
  {&__pyx_n_s__REF, __pyx_k__REF, sizeof(__pyx_k__REF), 0, 0, 1, 1},
  {&__pyx_n_s__RESERVED_FORMAT, __pyx_k__RESERVED_FORMAT, sizeof(__pyx_k__RESERVED_FORMAT), 0, 0, 1, 1},
  {&__pyx_n_s__RESERVED_INFO, __pyx_k__RESERVED_INFO, sizeof(__pyx_k__RESERVED_INFO), 0, 0, 1, 1},
  {&__pyx_n_s__RO, __pyx_k__RO, sizeof(__pyx_k__RO), 0, 0, 1, 1},
  {&__pyx_n_s__SB, __pyx_k__SB, sizeof(__pyx_k__SB), 0, 0, 1, 1},
  {&__pyx_n_s__SOMATIC, __pyx_k__SOMATIC, sizeof(__pyx_k__SOMATIC), 0, 0, 1, 1},
  {&__pyx_n_s__SVTYPE, __pyx_k__SVTYPE, sizeof(__pyx_k__SVTYPE), 0, 0, 1, 1},
  {&__pyx_n_s__SampleInfo, __pyx_k__SampleInfo, sizeof(__pyx_k__SampleInfo), 0, 0, 1, 1},
  {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
  {&__pyx_n_b__String, __pyx_k__String, sizeof(__pyx_k__String), 0, 0, 0, 1},
  {&__pyx_n_s__String, __pyx_k__String, sizeof(__pyx_k__String), 0, 0, 1, 1},
  {&__pyx_n_s__SyntaxError, __pyx_k__SyntaxError, sizeof(__pyx_k__SyntaxError), 0, 0, 1, 1},
  {&__pyx_n_b__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 0, 1},
  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
  {&__pyx_n_s__Tabixfile, __pyx_k__Tabixfile, sizeof(__pyx_k__Tabixfile), 0, 0, 1, 1},
  {&__pyx_n_s__UNKNOWN, __pyx_k__UNKNOWN, sizeof(__pyx_k__UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s__VALIDATED, __pyx_k__VALIDATED, sizeof(__pyx_k__VALIDATED), 0, 0, 1, 1},
  {&__pyx_n_s__VCFReader, __pyx_k__VCFReader, sizeof(__pyx_k__VCFReader), 0, 0, 1, 1},
  {&__pyx_n_s__VCFWriter, __pyx_k__VCFWriter, sizeof(__pyx_k__VCFWriter), 0, 0, 1, 1},
  {&__pyx_n_s__VERBOSE, __pyx_k__VERBOSE, sizeof(__pyx_k__VERBOSE), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__Writer, __pyx_k__Writer, sizeof(__pyx_k__Writer), 0, 0, 1, 1},
  {&__pyx_n_s___Filter, __pyx_k___Filter, sizeof(__pyx_k___Filter), 0, 0, 1, 1},
  {&__pyx_n_s___Format, __pyx_k___Format, sizeof(__pyx_k___Format), 0, 0, 1, 1},
  {&__pyx_n_s___Info, __pyx_k___Info, sizeof(__pyx_k___Info), 0, 0, 1, 1},
  {&__pyx_n_s___SampleInfo, __pyx_k___SampleInfo, sizeof(__pyx_k___SampleInfo), 0, 0, 1, 1},
  {&__pyx_n_s____doc__, __pyx_k____doc__, sizeof(__pyx_k____doc__), 0, 0, 1, 1},
  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s____update_readme, __pyx_k____update_readme, sizeof(__pyx_k____update_readme), 0, 0, 1, 1},
  {&__pyx_n_s___format_alt, __pyx_k___format_alt, sizeof(__pyx_k___format_alt), 0, 0, 1, 1},
  {&__pyx_n_s___format_info, __pyx_k___format_info, sizeof(__pyx_k___format_info), 0, 0, 1, 1},
  {&__pyx_n_s___format_qual, __pyx_k___format_qual, sizeof(__pyx_k___format_qual), 0, 0, 1, 1},
  {&__pyx_n_s___format_sample, __pyx_k___format_sample, sizeof(__pyx_k___format_sample), 0, 0, 1, 1},
  {&__pyx_n_s___map, __pyx_k___map, sizeof(__pyx_k___map), 0, 0, 1, 1},
  {&__pyx_n_s___parse_info, __pyx_k___parse_info, sizeof(__pyx_k___parse_info), 0, 0, 1, 1},
  {&__pyx_n_s___parse_metainfo, __pyx_k___parse_metainfo, sizeof(__pyx_k___parse_metainfo), 0, 0, 1, 1},
  {&__pyx_n_s___parse_sample, __pyx_k___parse_sample, sizeof(__pyx_k___parse_sample), 0, 0, 1, 1},
  {&__pyx_n_s___parse_samples, __pyx_k___parse_samples, sizeof(__pyx_k___parse_samples), 0, 0, 1, 1},
  {&__pyx_n_s___stringify, __pyx_k___stringify, sizeof(__pyx_k___stringify), 0, 0, 1, 1},
  {&__pyx_n_s___write_header, __pyx_k___write_header, sizeof(__pyx_k___write_header), 0, 0, 1, 1},
  {&__pyx_n_s__aaf, __pyx_k__aaf, sizeof(__pyx_k__aaf), 0, 0, 1, 1},
  {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1},
  {&__pyx_n_s__bad, __pyx_k__bad, sizeof(__pyx_k__bad), 0, 0, 1, 1},
  {&__pyx_n_s__call_rate, __pyx_k__call_rate, sizeof(__pyx_k__call_rate), 0, 0, 1, 1},
  {&__pyx_n_s__chr, __pyx_k__chr, sizeof(__pyx_k__chr), 0, 0, 1, 1},
  {&__pyx_n_s__chrom, __pyx_k__chrom, sizeof(__pyx_k__chrom), 0, 0, 1, 1},
  {&__pyx_n_s__cmp, __pyx_k__cmp, sizeof(__pyx_k__cmp), 0, 0, 1, 1},
  {&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1},
  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
  {&__pyx_n_s__complex, __pyx_k__complex, sizeof(__pyx_k__complex), 0, 0, 1, 1},
  {&__pyx_n_s__compressed, __pyx_k__compressed, sizeof(__pyx_k__compressed), 0, 0, 1, 1},
  {&__pyx_n_s__csv, __pyx_k__csv, sizeof(__pyx_k__csv), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__del, __pyx_k__del, sizeof(__pyx_k__del), 0, 0, 1, 1},
  {&__pyx_n_s__delimiter, __pyx_k__delimiter, sizeof(__pyx_k__delimiter), 0, 0, 1, 1},
  {&__pyx_n_s__desc, __pyx_k__desc, sizeof(__pyx_k__desc), 0, 0, 1, 1},
  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
  {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1},
  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
  {&__pyx_n_s__exit, __pyx_k__exit, sizeof(__pyx_k__exit), 0, 0, 1, 1},
  {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1},
  {&__pyx_n_s__fetch, __pyx_k__fetch, sizeof(__pyx_k__fetch), 0, 0, 1, 1},
  {&__pyx_n_s__ffs, __pyx_k__ffs, sizeof(__pyx_k__ffs), 0, 0, 1, 1},
  {&__pyx_n_s__file, __pyx_k__file, sizeof(__pyx_k__file), 0, 0, 1, 1},
  {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
  {&__pyx_n_s__fileobj, __pyx_k__fileobj, sizeof(__pyx_k__fileobj), 0, 0, 1, 1},
  {&__pyx_n_s__filt, __pyx_k__filt, sizeof(__pyx_k__filt), 0, 0, 1, 1},
  {&__pyx_n_s__filter_pattern, __pyx_k__filter_pattern, sizeof(__pyx_k__filter_pattern), 0, 0, 1, 1},
  {&__pyx_n_s__filter_string, __pyx_k__filter_string, sizeof(__pyx_k__filter_string), 0, 0, 1, 1},
  {&__pyx_n_s__filters, __pyx_k__filters, sizeof(__pyx_k__filters), 0, 0, 1, 1},
  {&__pyx_n_s__find, __pyx_k__find, sizeof(__pyx_k__find), 0, 0, 1, 1},
  {&__pyx_n_s__fixed_fields, __pyx_k__fixed_fields, sizeof(__pyx_k__fixed_fields), 0, 0, 1, 1},
  {&__pyx_n_s__fmt, __pyx_k__fmt, sizeof(__pyx_k__fmt), 0, 0, 1, 1},
  {&__pyx_n_s__form, __pyx_k__form, sizeof(__pyx_k__form), 0, 0, 1, 1},
  {&__pyx_n_s__format_pattern, __pyx_k__format_pattern, sizeof(__pyx_k__format_pattern), 0, 0, 1, 1},
  {&__pyx_n_s__format_string, __pyx_k__format_string, sizeof(__pyx_k__format_string), 0, 0, 1, 1},
  {&__pyx_n_s__formats, __pyx_k__formats, sizeof(__pyx_k__formats), 0, 0, 1, 1},
  {&__pyx_n_s__fsock, __pyx_k__fsock, sizeof(__pyx_k__fsock), 0, 0, 1, 1},
  {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1},
  {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1},
  {&__pyx_n_s__group, __pyx_k__group, sizeof(__pyx_k__group), 0, 0, 1, 1},
  {&__pyx_n_s__gt_alt_depth, __pyx_k__gt_alt_depth, sizeof(__pyx_k__gt_alt_depth), 0, 0, 1, 1},
  {&__pyx_n_s__gt_alt_depths, __pyx_k__gt_alt_depths, sizeof(__pyx_k__gt_alt_depths), 0, 0, 1, 1},
  {&__pyx_n_s__gt_bases, __pyx_k__gt_bases, sizeof(__pyx_k__gt_bases), 0, 0, 1, 1},
  {&__pyx_n_s__gt_depth, __pyx_k__gt_depth, sizeof(__pyx_k__gt_depth), 0, 0, 1, 1},
  {&__pyx_n_s__gt_depths, __pyx_k__gt_depths, sizeof(__pyx_k__gt_depths), 0, 0, 1, 1},
  {&__pyx_n_s__gt_phases, __pyx_k__gt_phases, sizeof(__pyx_k__gt_phases), 0, 0, 1, 1},
  {&__pyx_n_s__gt_qual, __pyx_k__gt_qual, sizeof(__pyx_k__gt_qual), 0, 0, 1, 1},
  {&__pyx_n_s__gt_quals, __pyx_k__gt_quals, sizeof(__pyx_k__gt_quals), 0, 0, 1, 1},
  {&__pyx_n_s__gt_ref_depth, __pyx_k__gt_ref_depth, sizeof(__pyx_k__gt_ref_depth), 0, 0, 1, 1},
  {&__pyx_n_s__gt_ref_depths, __pyx_k__gt_ref_depths, sizeof(__pyx_k__gt_ref_depths), 0, 0, 1, 1},
  {&__pyx_n_s__gt_type, __pyx_k__gt_type, sizeof(__pyx_k__gt_type), 0, 0, 1, 1},
  {&__pyx_n_s__gt_types, __pyx_k__gt_types, sizeof(__pyx_k__gt_types), 0, 0, 1, 1},
  {&__pyx_n_s__gzip, __pyx_k__gzip, sizeof(__pyx_k__gzip), 0, 0, 1, 1},
  {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
  {&__pyx_n_s__indel, __pyx_k__indel, sizeof(__pyx_k__indel), 0, 0, 1, 1},
  {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
  {&__pyx_n_s__info_pattern, __pyx_k__info_pattern, sizeof(__pyx_k__info_pattern), 0, 0, 1, 1},
  {&__pyx_n_s__info_string, __pyx_k__info_string, sizeof(__pyx_k__info_string), 0, 0, 1, 1},
  {&__pyx_n_s__infos, __pyx_k__infos, sizeof(__pyx_k__infos), 0, 0, 1, 1},
  {&__pyx_n_s__ins, __pyx_k__ins, sizeof(__pyx_k__ins), 0, 0, 1, 1},
  {&__pyx_n_s__is_deletion, __pyx_k__is_deletion, sizeof(__pyx_k__is_deletion), 0, 0, 1, 1},
  {&__pyx_n_s__is_het, __pyx_k__is_het, sizeof(__pyx_k__is_het), 0, 0, 1, 1},
  {&__pyx_n_s__is_indel, __pyx_k__is_indel, sizeof(__pyx_k__is_indel), 0, 0, 1, 1},
  {&__pyx_n_s__is_monomorphic, __pyx_k__is_monomorphic, sizeof(__pyx_k__is_monomorphic), 0, 0, 1, 1},
  {&__pyx_n_s__is_snp, __pyx_k__is_snp, sizeof(__pyx_k__is_snp), 0, 0, 1, 1},
  {&__pyx_n_s__is_sv, __pyx_k__is_sv, sizeof(__pyx_k__is_sv), 0, 0, 1, 1},
  {&__pyx_n_s__is_sv_precise, __pyx_k__is_sv_precise, sizeof(__pyx_k__is_sv_precise), 0, 0, 1, 1},
  {&__pyx_n_s__is_transition, __pyx_k__is_transition, sizeof(__pyx_k__is_transition), 0, 0, 1, 1},
  {&__pyx_n_s__is_variant, __pyx_k__is_variant, sizeof(__pyx_k__is_variant), 0, 0, 1, 1},
  {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
  {&__pyx_n_s__iterable, __pyx_k__iterable, sizeof(__pyx_k__iterable), 0, 0, 1, 1},
  {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1},
  {&__pyx_n_s__izip, __pyx_k__izip, sizeof(__pyx_k__izip), 0, 0, 1, 1},
  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
  {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1},
  {&__pyx_n_s__line, __pyx_k__line, sizeof(__pyx_k__line), 0, 0, 1, 1},
  {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1},
  {&__pyx_n_s__meta_pattern, __pyx_k__meta_pattern, sizeof(__pyx_k__meta_pattern), 0, 0, 1, 1},
  {&__pyx_n_s__meta_string, __pyx_k__meta_string, sizeof(__pyx_k__meta_string), 0, 0, 1, 1},
  {&__pyx_n_s__metadata, __pyx_k__metadata, sizeof(__pyx_k__metadata), 0, 0, 1, 1},
  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
  {&__pyx_n_s__namedtuple, __pyx_k__namedtuple, sizeof(__pyx_k__namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 0, 0, 1, 1},
  {&__pyx_n_s__none, __pyx_k__none, sizeof(__pyx_k__none), 0, 0, 1, 1},
  {&__pyx_n_s__nucl_diversity, __pyx_k__nucl_diversity, sizeof(__pyx_k__nucl_diversity), 0, 0, 1, 1},
  {&__pyx_n_s__num, __pyx_k__num, sizeof(__pyx_k__num), 0, 0, 1, 1},
  {&__pyx_n_s__num_called, __pyx_k__num_called, sizeof(__pyx_k__num_called), 0, 0, 1, 1},
  {&__pyx_n_s__num_het, __pyx_k__num_het, sizeof(__pyx_k__num_het), 0, 0, 1, 1},
  {&__pyx_n_s__num_hom_alt, __pyx_k__num_hom_alt, sizeof(__pyx_k__num_hom_alt), 0, 0, 1, 1},
  {&__pyx_n_s__num_hom_ref, __pyx_k__num_hom_ref, sizeof(__pyx_k__num_hom_ref), 0, 0, 1, 1},
  {&__pyx_n_s__num_unknown, __pyx_k__num_unknown, sizeof(__pyx_k__num_unknown), 0, 0, 1, 1},
  {&__pyx_n_s__number, __pyx_k__number, sizeof(__pyx_k__number), 0, 0, 1, 1},
  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
  {&__pyx_n_s__prepend_chr, __pyx_k__prepend_chr, sizeof(__pyx_k__prepend_chr), 0, 0, 1, 1},
  {&__pyx_n_s__property, __pyx_k__property, sizeof(__pyx_k__property), 0, 0, 1, 1},
  {&__pyx_n_s__pysam, __pyx_k__pysam, sizeof(__pyx_k__pysam), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
  {&__pyx_n_s__read_filter, __pyx_k__read_filter, sizeof(__pyx_k__read_filter), 0, 0, 1, 1},
  {&__pyx_n_s__read_format, __pyx_k__read_format, sizeof(__pyx_k__read_format), 0, 0, 1, 1},
  {&__pyx_n_s__read_info, __pyx_k__read_info, sizeof(__pyx_k__read_info), 0, 0, 1, 1},
  {&__pyx_n_s__read_meta, __pyx_k__read_meta, sizeof(__pyx_k__read_meta), 0, 0, 1, 1},
  {&__pyx_n_s__record, __pyx_k__record, sizeof(__pyx_k__record), 0, 0, 1, 1},
  {&__pyx_n_s__rstrip, __pyx_k__rstrip, sizeof(__pyx_k__rstrip), 0, 0, 1, 1},
  {&__pyx_n_s__samp_fmt, __pyx_k__samp_fmt, sizeof(__pyx_k__samp_fmt), 0, 0, 1, 1},
  {&__pyx_n_s__samp_fmt_nums, __pyx_k__samp_fmt_nums, sizeof(__pyx_k__samp_fmt_nums), 0, 0, 1, 1},
  {&__pyx_n_s__samp_fmt_s, __pyx_k__samp_fmt_s, sizeof(__pyx_k__samp_fmt_s), 0, 0, 1, 1},
  {&__pyx_n_s__samp_fmt_types, __pyx_k__samp_fmt_types, sizeof(__pyx_k__samp_fmt_types), 0, 0, 1, 1},
  {&__pyx_n_s__sample, __pyx_k__sample, sizeof(__pyx_k__sample), 0, 0, 1, 1},
  {&__pyx_n_s__sample_indexes, __pyx_k__sample_indexes, sizeof(__pyx_k__sample_indexes), 0, 0, 1, 1},
  {&__pyx_n_s__samples, __pyx_k__samples, sizeof(__pyx_k__samples), 0, 0, 1, 1},
  {&__pyx_n_s__seek, __pyx_k__seek, sizeof(__pyx_k__seek), 0, 0, 1, 1},
  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
  {&__pyx_n_s__site, __pyx_k__site, sizeof(__pyx_k__site), 0, 0, 1, 1},
  {&__pyx_n_s__snp, __pyx_k__snp, sizeof(__pyx_k__snp), 0, 0, 1, 1},
  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
  {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1},
  {&__pyx_n_s__stderr, __pyx_k__stderr, sizeof(__pyx_k__stderr), 0, 0, 1, 1},
  {&__pyx_n_s__stream, __pyx_k__stream, sizeof(__pyx_k__stream), 0, 0, 1, 1},
  {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
  {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1},
  {&__pyx_n_s__sv, __pyx_k__sv, sizeof(__pyx_k__sv), 0, 0, 1, 1},
  {&__pyx_n_s__sv_end, __pyx_k__sv_end, sizeof(__pyx_k__sv_end), 0, 0, 1, 1},
  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
  {&__pyx_n_s__tell, __pyx_k__tell, sizeof(__pyx_k__tell), 0, 0, 1, 1},
  {&__pyx_n_s__template, __pyx_k__template, sizeof(__pyx_k__template), 0, 0, 1, 1},
  {&__pyx_n_s__ts, __pyx_k__ts, sizeof(__pyx_k__ts), 0, 0, 1, 1},
  {&__pyx_n_s__tv, __pyx_k__tv, sizeof(__pyx_k__tv), 0, 0, 1, 1},
  {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
  {&__pyx_n_s__unknown, __pyx_k__unknown, sizeof(__pyx_k__unknown), 0, 0, 1, 1},
  {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
  {&__pyx_n_s__var_subtype, __pyx_k__var_subtype, sizeof(__pyx_k__var_subtype), 0, 0, 1, 1},
  {&__pyx_n_s__var_type, __pyx_k__var_type, sizeof(__pyx_k__var_type), 0, 0, 1, 1},
  {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 0, 0, 1, 1},
  {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1},
  {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1},
  {&__pyx_n_s__write_record, __pyx_k__write_record, sizeof(__pyx_k__write_record), 0, 0, 1, 1},
  {&__pyx_n_s__writer, __pyx_k__writer, sizeof(__pyx_k__writer), 0, 0, 1, 1},
  {&__pyx_n_s__writerow, __pyx_k__writerow, sizeof(__pyx_k__writerow), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1},
  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetName(__pyx_b, __pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_property = __Pyx_GetName(__pyx_b, __pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_super = __Pyx_GetName(__pyx_b, __pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_SyntaxError = __Pyx_GetName(__pyx_b, __pyx_n_s__SyntaxError); if (!__pyx_builtin_SyntaxError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_cmp = __Pyx_GetName(__pyx_b, __pyx_n_s__cmp); if (!__pyx_builtin_cmp) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_file = __Pyx_GetName(__pyx_b, __pyx_n_s__file); if (!__pyx_builtin_file) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #else
  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cyvcf/parser.pyx":64
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')             # <<<<<<<<<<<<<<
 * 
 *     def read_info(self, info_string):
 */
  __pyx_k_tuple_6 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_6);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));

  /* "cyvcf/parser.pyx":74
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
  __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__number)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_8);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));

  /* "cyvcf/parser.pyx":80
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_k_tuple_9 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_9);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));

  /* "cyvcf/parser.pyx":81
 * 
 *         info = _Info(match.group('id'), num,
 *                      match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), info)
 */
  __pyx_k_tuple_10 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__type)); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_10);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
  __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__desc)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_11);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));

  /* "cyvcf/parser.pyx":83
 *                      match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), info)             # <<<<<<<<<<<<<<
 * 
 *     def read_filter(self, filter_string):
 */
  __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_12);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));

  /* "cyvcf/parser.pyx":92
 *                 "One of the FILTER lines is malformed: %s" % filter_string)
 * 
 *         filt = _Filter(match.group('id'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), filt)
 */
  __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_14);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
  __pyx_k_tuple_15 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__desc)); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_15);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

  /* "cyvcf/parser.pyx":94
 *         filt = _Filter(match.group('id'), match.group('desc'))
 * 
 *         return (match.group('id'), filt)             # <<<<<<<<<<<<<<
 * 
 *     def read_format(self, format_string):
 */
  __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_16);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));

  /* "cyvcf/parser.pyx":104
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
  __pyx_k_tuple_18 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__number)); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "cyvcf/parser.pyx":110
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_19);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));

  /* "cyvcf/parser.pyx":111
 * 
 *         form = _Format(match.group('id'), num,
 *                        match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), form)
 */
  __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__type)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));
  __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__desc)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "cyvcf/parser.pyx":113
 *                        match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), form)             # <<<<<<<<<<<<<<
 * 
 *     def read_meta(self, meta_string):
 */
  __pyx_k_tuple_22 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "cyvcf/parser.pyx":117
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
  __pyx_k_tuple_24 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_24);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));

  /* "cyvcf/parser.pyx":143
 *         self.called = self.gt_nums is not None
 *         # True if the GT is phased (A|G, not A/G)
 *         if self.gt_nums is not None and self.data['GT'].find('|') >= 0:             # <<<<<<<<<<<<<<
 *             self.phased = 1
 *         else:
 */
  __pyx_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_26);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));

  /* "cyvcf/parser.pyx":196
 *                 return phase_char.join([self.site.alleles[int(a)] for a in alleles])
 *             except KeyError:
 *                 sys.stderr.write("Allele number not found in list of alleles\n")             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
  __pyx_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_30)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "cyvcf/parser.pyx":425
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in self.FORMAT.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */
  __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_37);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));

  /* "cyvcf/parser.pyx":779
 *             else:
 *                 # first remove both "<" and ">" from ALT
 *                 return self.ALT[0].strip('<>')             # <<<<<<<<<<<<<<
 *         else:
 *             return "unknown"
 */
  __pyx_k_tuple_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_41)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_42);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));

  /* "cyvcf/parser.pyx":833
 * 
 *         if not (fsock or filename):
 *             raise Exception('You must provide at least fsock or filename')             # <<<<<<<<<<<<<<
 * 
 *         if filename:
 */
  __pyx_k_tuple_44 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_43)); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_44);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));

  /* "cyvcf/parser.pyx":847
 *             self.filename = filename
 * 
 *         if compressed or (filename and filename.endswith('.gz')):             # <<<<<<<<<<<<<<
 *             self.reader = gzip.GzipFile(fileobj=self.reader)
 * 
 */
  __pyx_k_tuple_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_45)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_46);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));

  /* "cyvcf/parser.pyx":917
 * 
 *         line = self.reader.next()
 *         while line.startswith('##'):             # <<<<<<<<<<<<<<
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')
 */
  __pyx_k_tuple_48 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_48);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));

  /* "cyvcf/parser.pyx":919
 *         while line.startswith('##'):
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')             # <<<<<<<<<<<<<<
 * 
 *             if line.startswith('##INFO'):
 */
  __pyx_k_tuple_50 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_49)); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_50);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));

  /* "cyvcf/parser.pyx":921
 *             line = line.rstrip('\n')
 * 
 *             if line.startswith('##INFO'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_info(line)
 *                 self.infos[key] = val
 */
  __pyx_k_tuple_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_52);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));

  /* "cyvcf/parser.pyx":925
 *                 self.infos[key] = val
 * 
 *             elif line.startswith('##FILTER'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_filter(line)
 *                 self.filters[key] = val
 */
  __pyx_k_tuple_54 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_53)); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_54);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54));

  /* "cyvcf/parser.pyx":929
 *                 self.filters[key] = val
 * 
 *             elif line.startswith('##FORMAT'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_format(line)
 *                 self.formats[key] = val
 */
  __pyx_k_tuple_56 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_55)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_56);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56));

  /* "cyvcf/parser.pyx":939
 *             line = self.reader.next()
 * 
 *         if line.startswith('#'):  # the column def'n line - REQ'D             # <<<<<<<<<<<<<<
 *             self._col_defn_line = line
 *             self._header_lines.append(line)
 */
  __pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_57)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_58);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));

  /* "cyvcf/parser.pyx":947
 *             self._sample_indexes = dict([(x,i) for (i,x) in enumerate(self.samples)])
 *         else:
 *              sys.exit("Expected column definition line beginning with #.  Not found - exiting.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_59)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_60);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60));

  /* "cyvcf/parser.pyx":964
 *             return {}
 * 
 *         entries = info_str.split(';')             # <<<<<<<<<<<<<<
 *         retdict = {}
 * 
 */
  __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_61);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));

  /* "cyvcf/parser.pyx":972
 *         # for entry in entries:
 *         for i in xrange(n):
 *             entry = entries[i].split('=')             # <<<<<<<<<<<<<<
 *             # entry = entry.split('=')
 *             ID = entry[0]
 */
  __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_62)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_63);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));

  /* "cyvcf/parser.pyx":987
 * 
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = self._map(int, vals)
 */
  __pyx_k_tuple_64 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));

  /* "cyvcf/parser.pyx":993
 *                     val = self._map(float, vals)
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 val = self._map(float, vals)
 *             elif entry_type == b'Flag':
 */
  __pyx_k_tuple_65 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_65);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));

  /* "cyvcf/parser.pyx":1018
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 *         cdef list samp_fmt = samp_fmt_s.split(':')             # <<<<<<<<<<<<<<
 *         cdef list samp_fmt_types = []
 *         cdef list samp_fmt_nums = []
 */
  __pyx_k_tuple_66 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_66);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66));

  /* "cyvcf/parser.pyx":1113
 *         # TO DO: Optimize this into a C-loop
 *         for fmt, entry_type, entry_num, vals in itertools.izip(
 *                 samp_fmt, samp_fmt_types, samp_fmt_nums, sample.split(':')):             # <<<<<<<<<<<<<<
 * 
 *             # short circuit the most common
 */
  __pyx_k_tuple_67 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_67);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));

  /* "cyvcf/parser.pyx":1138
 * 
 * 
 *             vals = vals.split(',')             # <<<<<<<<<<<<<<
 * 
 *             if entry_type == 'Integer':
 */
  __pyx_k_tuple_68 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_68);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));

  /* "cyvcf/parser.pyx":1156
 *         cdef list row
 *         try:
 *             row = self.reader.next().rstrip().split('\t')             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             raise StopIteration
 */
  __pyx_k_tuple_69 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_39)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_69);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));

  /* "cyvcf/parser.pyx":1171
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_k_tuple_70 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_70);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70));

  /* "cyvcf/parser.pyx":1179
 *             qual = float(row[5])
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]             # <<<<<<<<<<<<<<
 *         if filt == b'PASS' or filt == b'.':
 *              filt = None
 */
  __pyx_k_tuple_71 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_71);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));

  /* "cyvcf/parser.pyx":1218
 * 
 *         #self._load_line(self.reader.next())
 *         cdef list row = line.split('\t')             # <<<<<<<<<<<<<<
 * 
 *         #CHROM
 */
  __pyx_k_tuple_72 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_39)); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_72);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));

  /* "cyvcf/parser.pyx":1231
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = other._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_k_tuple_73 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_73);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));

  /* "cyvcf/parser.pyx":1239
 *             qual = float(row[5])
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]             # <<<<<<<<<<<<<<
 *         if filt == b'PASS' or filt == b'.':
 *              filt = None
 */
  __pyx_k_tuple_74 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));

  /* "cyvcf/parser.pyx":1279
 *         """
 *         if not pysam:
 *             raise Exception('pysam not available, try "pip install pysam"?')             # <<<<<<<<<<<<<<
 * 
 *         if not self.filename:
 */
  __pyx_k_tuple_76 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_75)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_76);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));

  /* "cyvcf/parser.pyx":1282
 * 
 *         if not self.filename:
 *             raise Exception('Please provide a filename (or a "normal" fsock)')             # <<<<<<<<<<<<<<
 * 
 *         if not self._tabix:
 */
  __pyx_k_tuple_78 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_77)); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_78);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));

  /* "cyvcf/parser.pyx":1349
 *         if sample.data["GT"] is None:
 *             return "./."
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))             # <<<<<<<<<<<<<<
 * 
 *     def _stringify(self, x, none='.'):
 */
  __pyx_k_tuple_83 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_83);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));

  /* "cyvcf/parser.pyx":1363
 * def __update_readme():
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)             # <<<<<<<<<<<<<<
 * 
 * # backwards compatibility
 */
  __pyx_k_tuple_85 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_84), ((PyObject *)__pyx_n_s__w)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_85);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));

  /* "cyvcf/parser.pyx":29
 * _Filter = collections.namedtuple('Filter', ['id', 'desc'])
 * _Format = collections.namedtuple('Format', ['id', 'num', 'type', 'desc'])
 * _SampleInfo = collections.namedtuple('SampleInfo', 'samples, gt_bases, \             # <<<<<<<<<<<<<<
 *                                                     gt_types, gt_phases, \
 *                                                     gt_depths, gt_ref_depths, \
 */
  __pyx_k_tuple_112 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__SampleInfo), ((PyObject *)__pyx_kp_s_111)); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_112);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));

  /* "cyvcf/parser.pyx":46
 * class _vcf_metadata_parser(object):
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         super(_vcf_metadata_parser, self).__init__()
 *         self.info_pattern = re.compile(r'''\#\#INFO=<
 */
  __pyx_k_tuple_113 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
  __pyx_k_codeobj_114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s____init__, 46, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":66
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')
 * 
 *     def read_info(self, info_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information INFO line.'''
 *         match = self.info_pattern.match(info_string)
 */
  __pyx_k_tuple_118 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__info_string), ((PyObject *)__pyx_n_s__match), ((PyObject *)__pyx_n_s__num), ((PyObject *)__pyx_n_s__info)); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_118);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
  __pyx_k_codeobj_119 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s__read_info, 66, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":85
 *         return (match.group('id'), info)
 * 
 *     def read_filter(self, filter_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information FILTER line.'''
 *         match = self.filter_pattern.match(filter_string)
 */
  __pyx_k_tuple_121 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filter_string), ((PyObject *)__pyx_n_s__match), ((PyObject *)__pyx_n_s__filt)); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_121);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_121));
  __pyx_k_codeobj_122 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s__read_filter, 85, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":96
 *         return (match.group('id'), filt)
 * 
 *     def read_format(self, format_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information FORMAT line.'''
 *         match = self.format_pattern.match(format_string)
 */
  __pyx_k_tuple_124 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__format_string), ((PyObject *)__pyx_n_s__match), ((PyObject *)__pyx_n_s__num), ((PyObject *)__pyx_n_s__form)); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_124);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
  __pyx_k_codeobj_125 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s__read_format, 96, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":115
 *         return (match.group('id'), form)
 * 
 *     def read_meta(self, meta_string):             # <<<<<<<<<<<<<<
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')
 */
  __pyx_k_tuple_127 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__meta_string), ((PyObject *)__pyx_n_s__match)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_127);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
  __pyx_k_codeobj_128 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s__read_meta, 115, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1309
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.writer = csv.writer(stream, delimiter="\t")
 *         self.template = template
 */
  __pyx_k_tuple_132 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_n_s__line)); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_132);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));
  __pyx_k_codeobj_133 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s____init__, 1309, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1324
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */
  __pyx_k_tuple_135 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_135);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
  __pyx_k_codeobj_136 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s___write_header, 1324, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1328
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 * 
 *     def write_record(self, record):             # <<<<<<<<<<<<<<
 *         """ write a record to the file """
 *         ffs = self._map(str, [record.CHROM, record.POS, record.ID, record.REF]) \
 */
  __pyx_k_tuple_138 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__record), ((PyObject *)__pyx_n_s__ffs), ((PyObject *)__pyx_n_s__samples), ((PyObject *)__pyx_n_s__sample)); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_138);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138));
  __pyx_k_codeobj_139 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s__write_record, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1338
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */
  __pyx_k_tuple_141 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_141);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
  __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s___format_alt, 1338, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1341
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */
  __pyx_k_tuple_144 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_144);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_144));
  __pyx_k_codeobj_145 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s___format_info, 1341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1346
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])
 * 
 *     def _format_sample(self, fmt, sample):             # <<<<<<<<<<<<<<
 *         if sample.data["GT"] is None:
 *             return "./."
 */
  __pyx_k_tuple_147 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__fmt), ((PyObject *)__pyx_n_s__sample), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_147);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147));
  __pyx_k_codeobj_148 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s___format_sample, 1346, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1351
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))
 * 
 *     def _stringify(self, x, none='.'):             # <<<<<<<<<<<<<<
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))
 */
  __pyx_k_tuple_150 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__none)); if (unlikely(!__pyx_k_tuple_150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_150);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_150));
  __pyx_k_codeobj_151 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s___stringify, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_152 = PyTuple_Pack(1, ((PyObject *)((PyObject*)__pyx_kp_s_33))); if (unlikely(!__pyx_k_tuple_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_152);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_152));

  /* "cyvcf/parser.pyx":1356
 *         return str(x) if x is not None else none
 * 
 *     def _map(self, func, iterable, none='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 */
  __pyx_k_tuple_154 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__iterable), ((PyObject *)__pyx_n_s__none), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_154);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154));
  __pyx_k_codeobj_155 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s___map, 1356, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_156 = PyTuple_Pack(1, ((PyObject *)((PyObject*)__pyx_kp_s_33))); if (unlikely(!__pyx_k_tuple_156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_156);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_156));

  /* "cyvcf/parser.pyx":1361
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */
  __pyx_k_tuple_159 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__sys), ((PyObject *)__pyx_n_s__vcf)); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_159);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
  __pyx_k_codeobj_160 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_115, __pyx_n_s____update_readme, 1361, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_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;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initparser(void); /*proto*/
PyMODINIT_FUNC initparser(void)
#else
PyMODINIT_FUNC PyInit_parser(void); /*proto*/
PyMODINIT_FUNC PyInit_parser(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_parser(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("parser"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "cyvcf.parser")) {
      if (unlikely(PyDict_SetItemString(modules, "cyvcf.parser", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_cyvcf__parser) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser__Call) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5cyvcf_6parser__Call, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_5cyvcf_6parser_5_Call_6__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_5cyvcf_6parser_5_Call_6__getitem__.doc = __pyx_doc_5cyvcf_6parser_5_Call_6__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5cyvcf_6parser_5_Call_6__getitem__;
    }
  }
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "_Call", (PyObject *)&__pyx_type_5cyvcf_6parser__Call) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser__Call = &__pyx_type_5cyvcf_6parser__Call;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser__Record) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "_Record", (PyObject *)&__pyx_type_5cyvcf_6parser__Record) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser__Record = &__pyx_type_5cyvcf_6parser__Record;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5cyvcf_6parser_Reader, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_5cyvcf_6parser_6Reader___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_5cyvcf_6parser_6Reader___init__.doc = __pyx_doc_5cyvcf_6parser_6Reader___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5cyvcf_6parser_6Reader___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5cyvcf_6parser_Reader, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_5cyvcf_6parser_6Reader_18__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_5cyvcf_6parser_6Reader_18__next__.doc = __pyx_doc_5cyvcf_6parser_6Reader_18__next__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5cyvcf_6parser_6Reader_18__next__;
    }
  }
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "Reader", (PyObject *)&__pyx_type_5cyvcf_6parser_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser_Reader = &__pyx_type_5cyvcf_6parser_Reader;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser___pyx_scope_struct___format_sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser___pyx_scope_struct___format_sample = &__pyx_type_5cyvcf_6parser___pyx_scope_struct___format_sample;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser___pyx_scope_struct_1_genexpr = &__pyx_type_5cyvcf_6parser___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser___pyx_scope_struct_2__format_sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser___pyx_scope_struct_2__format_sample = &__pyx_type_5cyvcf_6parser___pyx_scope_struct_2__format_sample;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser___pyx_scope_struct_3_genexpr = &__pyx_type_5cyvcf_6parser___pyx_scope_struct_3_genexpr;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "cyvcf/parser.pyx":1
 * import collections             # <<<<<<<<<<<<<<
 * import re
 * import csv
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":2
 * import collections
 * import re             # <<<<<<<<<<<<<<
 * import csv
 * import gzip
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":3
 * import collections
 * import re
 * import csv             # <<<<<<<<<<<<<<
 * import gzip
 * import sys
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__csv), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__csv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":4
 * import re
 * import csv
 * import gzip             # <<<<<<<<<<<<<<
 * import sys
 * import itertools
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__gzip), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":5
 * import csv
 * import gzip
 * import sys             # <<<<<<<<<<<<<<
 * import itertools
 * 
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":6
 * import gzip
 * import sys
 * import itertools             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":8
 * import itertools
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import pysam
 * except ImportError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cyvcf/parser.pyx":9
 * 
 * try:
 *     import pysam             # <<<<<<<<<<<<<<
 * except ImportError:
 *     pysam = None
 */
      __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pysam), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pysam, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":10
 * try:
 *     import pysam
 * except ImportError:             # <<<<<<<<<<<<<<
 *     pysam = None
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("cyvcf.parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "cyvcf/parser.pyx":11
 *     import pysam
 * except ImportError:
 *     pysam = None             # <<<<<<<<<<<<<<
 * 
 * # Metadata parsers/constants
 */
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pysam, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L3_exception_handled;
    }
    __pyx_L4_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L9_try_end:;
  }

  /* "cyvcf/parser.pyx":14
 * 
 * # Metadata parsers/constants
 * RESERVED_INFO = {             # <<<<<<<<<<<<<<
 *     'AA': 'String', 'AC': 'Integer', 'AF': 'Float', 'AN': 'Integer',
 *     'BQ': 'Float', 'CIGAR': 'String', 'DB': 'Flag', 'DP': 'Integer',
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__AA), ((PyObject *)__pyx_n_s__String)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__AC), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__AF), ((PyObject *)__pyx_n_s__Float)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__AN), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__BQ), ((PyObject *)__pyx_n_s__Float)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__CIGAR), ((PyObject *)__pyx_n_s__String)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__DB), ((PyObject *)__pyx_n_s__Flag)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__DP), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__END), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__H2), ((PyObject *)__pyx_n_s__Flag)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__MQ), ((PyObject *)__pyx_n_s__Float)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__MQ0), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__NS), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__SB), ((PyObject *)__pyx_n_s__String)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__SOMATIC), ((PyObject *)__pyx_n_s__Flag)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__VALIDATED), ((PyObject *)__pyx_n_s__Flag)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RESERVED_INFO, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":21
 * }
 * 
 * RESERVED_FORMAT = {             # <<<<<<<<<<<<<<
 *     'GT': 'String', 'DP': 'Integer', 'FT': 'String', 'GL': 'Float',
 *     'GQ': 'Float', 'HQ': 'Float'
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__GT), ((PyObject *)__pyx_n_s__String)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__DP), ((PyObject *)__pyx_n_s__Integer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__FT), ((PyObject *)__pyx_n_s__String)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__GL), ((PyObject *)__pyx_n_s__Float)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_n_s__Float)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__HQ), ((PyObject *)__pyx_n_s__Float)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RESERVED_FORMAT, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":26
 * }
 * 
 * _Info = collections.namedtuple('Info', ['id', 'num', 'type', 'desc'])             # <<<<<<<<<<<<<<
 * _Filter = collections.namedtuple('Filter', ['id', 'desc'])
 * _Format = collections.namedtuple('Format', ['id', 'num', 'type', 'desc'])
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__id));
  PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__id));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__num));
  PyList_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__num));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__num));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__type));
  PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_n_s__type));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__type));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__desc));
  PyList_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_n_s__desc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__desc));
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Info));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Info));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Info));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___Info, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":27
 * 
 * _Info = collections.namedtuple('Info', ['id', 'num', 'type', 'desc'])
 * _Filter = collections.namedtuple('Filter', ['id', 'desc'])             # <<<<<<<<<<<<<<
 * _Format = collections.namedtuple('Format', ['id', 'num', 'type', 'desc'])
 * _SampleInfo = collections.namedtuple('SampleInfo', 'samples, gt_bases, \
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__id));
  PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__id));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__desc));
  PyList_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__desc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__desc));
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Filter));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__Filter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Filter));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___Filter, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":28
 * _Info = collections.namedtuple('Info', ['id', 'num', 'type', 'desc'])
 * _Filter = collections.namedtuple('Filter', ['id', 'desc'])
 * _Format = collections.namedtuple('Format', ['id', 'num', 'type', 'desc'])             # <<<<<<<<<<<<<<
 * _SampleInfo = collections.namedtuple('SampleInfo', 'samples, gt_bases, \
 *                                                     gt_types, gt_phases, \
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__id));
  PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__id));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__num));
  PyList_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__num));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__num));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__type));
  PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_n_s__type));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__type));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__desc));
  PyList_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_n_s__desc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__desc));
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Format));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Format));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___Format, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":29
 * _Filter = collections.namedtuple('Filter', ['id', 'desc'])
 * _Format = collections.namedtuple('Format', ['id', 'num', 'type', 'desc'])
 * _SampleInfo = collections.namedtuple('SampleInfo', 'samples, gt_bases, \             # <<<<<<<<<<<<<<
 *                                                     gt_types, gt_phases, \
 *                                                     gt_depths, gt_ref_depths, \
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_112), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___SampleInfo, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":38
 * 
 * 
 * HOM_REF = 0             # <<<<<<<<<<<<<<
 * HET = 1
 * HOM_ALT = 3
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HOM_REF, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":39
 * 
 * HOM_REF = 0
 * HET = 1             # <<<<<<<<<<<<<<
 * HOM_ALT = 3
 * UNKNOWN = 2
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HET, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":40
 * HOM_REF = 0
 * HET = 1
 * HOM_ALT = 3             # <<<<<<<<<<<<<<
 * UNKNOWN = 2
 * 
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HOM_ALT, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":41
 * HET = 1
 * HOM_ALT = 3
 * UNKNOWN = 2             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UNKNOWN, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":44
 * 
 * 
 * class _vcf_metadata_parser(object):             # <<<<<<<<<<<<<<
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));

  /* "cyvcf/parser.pyx":46
 * class _vcf_metadata_parser(object):
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         super(_vcf_metadata_parser, self).__init__()
 *         self.info_pattern = re.compile(r'''\#\#INFO=<
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_1__init__, 0, __pyx_n_s_116, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_114)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":66
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')
 * 
 *     def read_info(self, info_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information INFO line.'''
 *         match = self.info_pattern.match(info_string)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_3read_info, 0, __pyx_n_s_120, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_119)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s__read_info, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":85
 *         return (match.group('id'), info)
 * 
 *     def read_filter(self, filter_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information FILTER line.'''
 *         match = self.filter_pattern.match(filter_string)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter, 0, __pyx_n_s_123, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_122)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s__read_filter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":96
 *         return (match.group('id'), filt)
 * 
 *     def read_format(self, format_string):             # <<<<<<<<<<<<<<
 *         '''Read a meta-information FORMAT line.'''
 *         match = self.format_pattern.match(format_string)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_7read_format, 0, __pyx_n_s_126, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_125)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s__read_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":115
 *         return (match.group('id'), form)
 * 
 *     def read_meta(self, meta_string):             # <<<<<<<<<<<<<<
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta, 0, __pyx_n_s_129, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_128)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s__read_meta, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":44
 * 
 * 
 * class _vcf_metadata_parser(object):             # <<<<<<<<<<<<<<
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  if (PyDict_SetItemString(((PyObject *)__pyx_t_7), "__doc__", ((PyObject *)__pyx_kp_s_130)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_7), __pyx_n_s_1, __pyx_n_s_1, __pyx_n_s_117); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_1, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":183
 * 
 *     @property
 *     def gt_bases(self):             # <<<<<<<<<<<<<<
 *         '''The actual genotype alleles.
 *            E.g. if VCF genotype is 0/1, return A/G
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__gt_bases); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__gt_bases, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":201
 * 
 *     @property
 *     def gt_type(self):             # <<<<<<<<<<<<<<
 *         '''The type of genotype.
 *            0 / 00000000 hom ref
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__gt_type); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__gt_type, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":237
 * 
 *     @property
 *     def gt_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that led to the genotype
 *         call for this sample.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__gt_depth); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__gt_depth, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":252
 * 
 *     @property
 *     def gt_ref_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that supported the
 *         reference allele for this sample.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__gt_ref_depth); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__gt_ref_depth, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":277
 * 
 *     @property
 *     def gt_alt_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that supported the
 *         alternate allele for this sample.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__gt_alt_depth); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__gt_alt_depth, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":302
 * 
 *     @property
 *     def gt_qual(self):             # <<<<<<<<<<<<<<
 *         '''The PHRED-scaled quality of genotype
 *         call for this sample.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__gt_qual); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__gt_qual, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":317
 * 
 *     @property
 *     def is_variant(self):             # <<<<<<<<<<<<<<
 *         """ Return True if not a reference call """
 *         if not self.called:
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__is_variant); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__is_variant, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":324
 * 
 *     @property
 *     def is_het(self):             # <<<<<<<<<<<<<<
 *         """ Return True for heterozygous calls """
 *         if not self.called:
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s__is_het); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s__is_het, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Call);

  /* "cyvcf/parser.pyx":464
 *         self.FILTER = tmp
 * 
 *     def add_info(self, info, value=True):             # <<<<<<<<<<<<<<
 *         self.INFO[info] = value
 * 
 */
  __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_k_40 = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":593
 * 
 *     @property
 *     def call_rate(self):             # <<<<<<<<<<<<<<
 *         """ The fraction of genotypes that were actually called. """
 *         return float(self.num_called) / float(len(self.samples))
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__call_rate); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__call_rate, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":598
 * 
 *     @property
 *     def aaf(self):             # <<<<<<<<<<<<<<
 *         """ The allele frequency of the alternate allele.
 *            NOTE 1: Punt if more than one alternate allele.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__aaf); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__aaf, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":616
 * 
 *     @property
 *     def nucl_diversity(self):             # <<<<<<<<<<<<<<
 *         """
 *         pi_hat (estimation of nucleotide diversity) for the site.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__nucl_diversity); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__nucl_diversity, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":652
 * 
 *     @property
 *     def is_snp(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is a SNP """
 *         if len(self.REF) > 1: return False
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_snp); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_snp, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":661
 * 
 *     @property
 *     def is_indel(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is an INDEL """
 *         is_sv = self.is_sv
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_indel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_indel, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":680
 * 
 *     @property
 *     def is_sv(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is a structural variant """
 *         if self.INFO.get('SVTYPE') is None:
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_sv); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_sv, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":687
 * 
 *     @property
 *     def is_transition(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the SNP is a transition """
 *         # if multiple alts, it is unclear if we have a transition
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_transition); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_transition, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":704
 * 
 *     @property
 *     def is_deletion(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the INDEL is a deletion """
 *         # if multiple alts, it is unclear if we have a transition
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_deletion); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_deletion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":720
 * 
 *     @property
 *     def var_type(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the type of variant [snp, indel, unknown]
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__var_type); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__var_type, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":735
 * 
 *     @property
 *     def var_subtype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the subtype of variant.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__var_subtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__var_subtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":784
 * 
 *     @property
 *     def sv_end(self):             # <<<<<<<<<<<<<<
 *         """ Return the end position for the SV """
 *         if self.is_sv:
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__sv_end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__sv_end, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":791
 * 
 *     @property
 *     def is_sv_precise(self):             # <<<<<<<<<<<<<<
 *         """ Return whether the SV cordinates are mapped
 *             to 1 b.p. resolution.
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_sv_precise); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_sv_precise, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":803
 * 
 *     @property
 *     def is_monomorphic(self):             # <<<<<<<<<<<<<<
 *         """ Return True for reference calls """
 *         return len(self.ALT) == 1 and self.ALT[0] is None
 */
  __pyx_t_7 = __Pyx_GetName((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s__is_monomorphic); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Record->tp_dict, __pyx_n_s__is_monomorphic, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":1304
 * 
 * 
 * class Writer(object):             # <<<<<<<<<<<<<<
 *     """ VCF Writer """
 * 
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));

  /* "cyvcf/parser.pyx":1307
 *     """ VCF Writer """
 * 
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, stream, template):
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_131), __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __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 = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s__fixed_fields, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1309
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.writer = csv.writer(stream, delimiter="\t")
 *         self.template = template
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_1__init__, 0, __pyx_n_s_134, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_133)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1324
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_3_write_header, 0, __pyx_n_s_137, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_136)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s___write_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1328
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 * 
 *     def write_record(self, record):             # <<<<<<<<<<<<<<
 *         """ write a record to the file """
 *         ffs = self._map(str, [record.CHROM, record.POS, record.ID, record.REF]) \
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_5write_record, 0, __pyx_n_s_140, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_139)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s__write_record, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1338
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_7_format_alt, 0, __pyx_n_s_143, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_142)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s___format_alt, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1341
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_9_format_info, 0, __pyx_n_s_146, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_145)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s___format_info, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1346
 *         return ';'.join(["%s=%s" % (x, self._stringify(y)) for x, y in info.items()])
 * 
 *     def _format_sample(self, fmt, sample):             # <<<<<<<<<<<<<<
 *         if sample.data["GT"] is None:
 *             return "./."
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_11_format_sample, 0, __pyx_n_s_149, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_148)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s___format_sample, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1351
 *         return ':'.join(self._stringify(sample.data[f]) for f in fmt.split(':'))
 * 
 *     def _stringify(self, x, none='.'):             # <<<<<<<<<<<<<<
 *         if type(x) == type([]):
 *             return ','.join(self._map(str, x, none))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_13_stringify, 0, __pyx_n_s_153, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_151)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_152));
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s___stringify, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1356
 *         return str(x) if x is not None else none
 * 
 *     def _map(self, func, iterable, none='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_15_map, 0, __pyx_n_s_157, NULL, __pyx_n_s_117, ((PyObject *)__pyx_k_codeobj_155)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_156));
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s___map, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1304
 * 
 * 
 * class Writer(object):             # <<<<<<<<<<<<<<
 *     """ VCF Writer """
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  if (PyDict_SetItemString(((PyObject *)__pyx_t_7), "__doc__", ((PyObject *)__pyx_kp_s_158)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_7), __pyx_n_s__Writer, __pyx_n_s__Writer, __pyx_n_s_117); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Writer, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1361
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_1__update_readme, NULL, __pyx_n_s_117); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____update_readme, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1366
 * 
 * # backwards compatibility
 * VCFReader = Reader             # <<<<<<<<<<<<<<
 * VCFWriter = Writer
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VCFReader, ((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser_Reader))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1367
 * # backwards compatibility
 * VCFReader = Reader
 * VCFWriter = Writer             # <<<<<<<<<<<<<<
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__Writer); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VCFWriter, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1
 * import collections             # <<<<<<<<<<<<<<
 * import re
 * import csv
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__pyx_m) {
    __Pyx_AddTraceback("init cyvcf.parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cyvcf.parser");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *args;
        if (!value)
            args = PyTuple_New(0);
        else if (PyTuple_Check(value)) {
            Py_INCREF(value);
            args = value;
        }
        else
            args = PyTuple_Pack(1, value);
        if (!args)
            goto bad;
        owned_instance = PyEval_CallObject(type, args);
        Py_DECREF(args);
        if (!owned_instance)
            goto bad;
        value = owned_instance;
        if (!PyExceptionInstance_Check(value)) {
            PyErr_Format(PyExc_TypeError,
                         "calling %R should have returned an instance of "
                         "BaseException, not %R",
                         type, Py_TYPE(value));
            goto bad;
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause && cause != Py_None) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (DECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyBytes_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
            else
                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
        } else {
            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import = 0;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *qualname, PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;
    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;
    if (PyDict_SetItemString(dict, "__qualname__", qualname) < 0)
        return NULL;
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        value = Py_None; /* Mark as deleted */
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
{
    if (op->defaults_tuple) {
        Py_INCREF(op->defaults_tuple);
        return op->defaults_tuple;
    }
    if (op->defaults_getter) {
        PyObject *res = op->defaults_getter((PyObject *) op);
        if (likely(res)) {
            Py_INCREF(res);
            op->defaults_tuple = res;
        }
        return res;
    }
    Py_INCREF(Py_None);
    return Py_None;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_getter = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, sizeof(size));
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

static PyObject *__Pyx_Generator_Next(PyObject *self);
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Generator_Close(PyObject *self);
static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (unlikely(et != PyExc_StopIteration) &&
            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = PyObject_GetAttrString(ev, "args");
        Py_DECREF(ev);
        if (likely(args)) {
            value = PyObject_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        /* Generators always return to their most recent caller, not
         * necessarily their creator. */
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        /* Don't keep the reference to f_back any longer than necessary.  It
         * may keep a chain of frames alive or it could create a reference
         * cycle. */
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Generator_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Generator_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Send(yf, value);
        } else {
            if (value == Py_None)
                ret = PyIter_Next(yf);
            else
                ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, value);
}
static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Generator_Close(yf);
        if (!retval)
            return -1;
    } else {
        PyObject *meth;
        gen->is_running = 1;
        meth = PyObject_GetAttrString(yf, "close");
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Close(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Generator_CloseIter(gen, yf);
        __Pyx_Generator_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
#if PY_VERSION_HEX < 0x02050000
        PyErr_SetNone(PyExc_StopIteration);
#else
        PyErr_SetNone(PyExc_GeneratorExit);
#endif
    retval = __Pyx_Generator_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
#if PY_VERSION_HEX >= 0x02050000
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
#endif
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();      /* ignore these errors */
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
#if PY_VERSION_HEX >= 0x02050000
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Generator_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Generator_Undelegate(gen);
            if (err < 0)
                return __Pyx_Generator_SendEx(gen, NULL);
            goto throw_here;
        }
#endif
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Throw(yf, args);
        } else {
            PyObject *meth = PyObject_GetAttrString(yf, "throw");
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Generator_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Generator_FinishDelegation(gen);
        }
        return ret;
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Generator_SendEx(gen, NULL);
}
static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Generator_clear(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    return 0;
}
static void __Pyx_Generator_dealloc(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    PyObject_GC_Track(self);
    if (gen->resume_label > 0) {
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
            return;                     /* resurrected.  :( */
    }
    PyObject_GC_UnTrack(self);
    __Pyx_Generator_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Generator_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    if (gen->resume_label <= 0)
        return ;
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Generator_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
    /* Undo the temporary resurrection; can't use DECREF here, it would
     * cause a recursive call.
     */
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0)
        return; /* this is the normal path out */
    /* close() resurrected it!  Make it look like the original Py_DECREF
     * never happened.
     */
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_FOR_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
     * we need to undo that. */
    _Py_DEC_REFTOTAL;
#endif
    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
     * chain, so no more to do there.
     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
     * _Py_NewReference bumped tp_allocs:  both of those need to be
     * undone.
     */
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
}
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running",
#if PY_VERSION_HEX >= 0x02060000
     T_BOOL,
#else
     T_BYTE,
#endif
     offsetof(__pyx_GeneratorObject, is_running),
     READONLY,
     NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("generator"),         /*tp_name*/
    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    0,                                   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    0,                                  /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
    0,                                  /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
    __pyx_Generator_methods,            /*tp_methods*/
    __pyx_Generator_memberlist,         /*tp_members*/
    0,                                  /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    0,                                  /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    0,                                  /*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    __Pyx_Generator_del,                /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure) {
    __pyx_GeneratorObject *gen =
        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    PyObject_GC_Track(gen);
    return gen;
}
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    if (PyType_Ready(&__pyx_GeneratorType_type)) {
        return -1;
    }
    __pyx_GeneratorType = &__pyx_GeneratorType_type;
    return 0;
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
