/* Generated by Cython 0.20.2 on Wed Mar 18 18:46:53 2015 */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#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
#define CYTHON_ABI "0_20_2"
#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 CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
#define Py_OptimizeFlag 0
#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_As_int(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+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#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)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#if PY_VERSION_HEX < 0x02060000
  #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 < 0x02060000
  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
#endif
#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
  #define Py_TPFLAGS_IS_ABSTRACT 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
  #define Py_TPFLAGS_HAVE_FINALIZE 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_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #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_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#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_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
                                         PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#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
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x030200A4
  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
#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_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#ifdef __cplusplus
template<typename T>
void __Pyx_call_destructor(T* x) {
    x->~T();
}
#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_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 Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
    (sizeof(type) > sizeof(Py_ssize_t) &&               \
          likely(v < (type)PY_SSIZE_T_MAX ||            \
                 v == (type)PY_SSIZE_T_MAX)  &&         \
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
                                v == (type)PY_SSIZE_T_MIN)))  ||  \
    (sizeof(type) == sizeof(Py_ssize_t) &&              \
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#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);
#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))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
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__Call;
struct __pyx_obj_5cyvcf_6parser__Record;
struct __pyx_obj_5cyvcf_6parser_Reader;
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___pyx_scope_struct_2__format_sample;
struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr;

/* "cyvcf/parser.pyx":121
 * 
 * 
 * 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":356
 * 
 * 
 * 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 *gt_copy_numbers;
  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":844
 * 
 * 
 * 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;
};


/* "cyvcf/parser.pyx":452
 *         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":455
 *         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":1388
 *         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":1391
 *         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 *);
};

#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_XDECREF_SET(r, v) do {                            \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_XDECREF(tmp);                              \
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {                             \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_DECREF(tmp);                               \
    } while (0)
#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)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*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 CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

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

static CYTHON_INLINE 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()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        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); /*proto*/

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_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_ListComp_Append(L,x) PyList_Append(L,x)
#endif

#include <string.h>

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

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

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#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*/

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

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 int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/
#endif

static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
    PyObject *method, *result = NULL;
    if (unlikely(!args)) return NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_Call(method, args, NULL);
    Py_DECREF(method);
bad:
    Py_DECREF(args);
    return result;
}
#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
#define __Pyx_PyObject_CallMethod0(obj, name) \
    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))

static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

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

#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) & likely(len > (L->allocated >> 1))) {
        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 PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

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));
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

#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;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;   /* Const defaults tuple */
    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations; /* function annotations dict */
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      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 CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __Pyx_CyFunction_init(void);

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/

static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*proto*/

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

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);

static CYTHON_INLINE long __Pyx_PyInt_As_long(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;
} __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_20gt_copy_number(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_22is_variant(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_24is_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, PyObject *__pyx_v_gt_copy_numbers, 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_15gt_copy_numbers___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 PyObject *__pyx_tp_new_5cyvcf_6parser__Call(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5cyvcf_6parser__Record(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5cyvcf_6parser_Reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct___format_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_2__format_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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_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_CN[] = "CN";
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_gz[] = ".gz";
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__17[] = "|";
static char __pyx_k__19[] = "";
static char __pyx_k__20[] = "/";
static char __pyx_k__21[] = ".";
static char __pyx_k__23[] = ",";
static char __pyx_k__24[] = ";";
static char __pyx_k__25[] = ":";
static char __pyx_k__27[] = "./.";
static char __pyx_k__28[] = "\t";
static char __pyx_k__29[] = "<>";
static char __pyx_k__33[] = "##";
static char __pyx_k__35[] = "\n";
static char __pyx_k__40[] = "#";
static char __pyx_k__45[] = "=";
static char __pyx_k__52[] = ".|.";
static char __pyx_k__66[] = "?";
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_doc[] = "__doc__";
static char __pyx_k_end[] = "end";
static char __pyx_k_ffs[] = "ffs";
static char __pyx_k_fmt[] = "fmt";
static char __pyx_k_get[] = "get";
static char __pyx_k_ins[] = "ins";
static char __pyx_k_key[] = "key";
static char __pyx_k_map[] = "_map";
static char __pyx_k_num[] = "num";
static char __pyx_k_s_s[] = "%s=%s";
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_args[] = "args";
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_init[] = "__init__";
static char __pyx_k_izip[] = "izip";
static char __pyx_k_join[] = "join";
static char __pyx_k_line[] = "line";
static char __pyx_k_main[] = "__main__";
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_send[] = "send";
static char __pyx_k_site[] = "site";
static char __pyx_k_tell[] = "tell";
static char __pyx_k_test[] = "__test__";
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_chrom[] = "chrom";
static char __pyx_k_close[] = "close";
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_s_s_2[] = "##%s=%s\n";
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_throw[] = "throw";
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_INFO_2[] = "##INFO";
static char __pyx_k_Info_2[] = "Info";
static char __pyx_k_SVTYPE[] = "SVTYPE";
static char __pyx_k_String[] = "String";
static char __pyx_k_Writer[] = "Writer";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_is_het[] = "is_het";
static char __pyx_k_is_snp[] = "is_snp";
static char __pyx_k_module[] = "__module__";
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_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_prepare[] = "__prepare__";
static char __pyx_k_samples[] = "samples";
static char __pyx_k_unknown[] = "unknown";
static char __pyx_k_FILTER_2[] = "##FILTER";
static char __pyx_k_FORMAT_2[] = "##FORMAT";
static char __pyx_k_Filter_2[] = "Filter";
static char __pyx_k_Format_2[] = "Format";
static char __pyx_k_GzipFile[] = "GzipFile";
static char __pyx_k_KeyError[] = "KeyError";
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_qualname[] = "__qualname__";
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_metaclass[] = "__metaclass__";
static char __pyx_k_read_info[] = "read_info";
static char __pyx_k_read_meta[] = "read_meta";
static char __pyx_k_stringify[] = "_stringify";
static char __pyx_k_IndexError[] = "IndexError";
static char __pyx_k_README_rst[] = "README.rst";
static char __pyx_k_SampleInfo[] = "_SampleInfo";
static char __pyx_k_VCF_Writer[] = " VCF Writer ";
static char __pyx_k_ValueError[] = "ValueError";
static char __pyx_k_compressed[] = "compressed";
static char __pyx_k_format_alt[] = "_format_alt";
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_parse_info[] = "_parse_info";
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_P_key_P_val[] = "##(?P<key>.+)=(?P<val>.+)";
static char __pyx_k_SyntaxError[] = "SyntaxError";
static char __pyx_k_Writer__map[] = "Writer._map";
static char __pyx_k_collections[] = "collections";
static char __pyx_k_format_info[] = "_format_info";
static char __pyx_k_format_qual[] = "_format_qual";
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_SampleInfo_2[] = "SampleInfo";
static char __pyx_k_cyvcf_parser[] = "cyvcf.parser";
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_parse_sample[] = "_parse_sample";
static char __pyx_k_write_header[] = "_write_header";
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_Writer___init[] = "Writer.__init__";
static char __pyx_k_filter_string[] = "filter_string";
static char __pyx_k_format_sample[] = "_format_sample";
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_parse_samples[] = "_parse_samples";
static char __pyx_k_samp_fmt_nums[] = "samp_fmt_nums";
static char __pyx_k_update_readme[] = "__update_readme";
static char __pyx_k_filter_pattern[] = "filter_pattern";
static char __pyx_k_format_pattern[] = "format_pattern";
static char __pyx_k_gt_copy_number[] = "gt_copy_number";
static char __pyx_k_is_monomorphic[] = "is_monomorphic";
static char __pyx_k_nucl_diversity[] = "nucl_diversity";
static char __pyx_k_parse_metainfo[] = "_parse_metainfo";
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_gt_copy_numbers[] = "gt_copy_numbers";
static char __pyx_k_Writer__stringify[] = "Writer._stringify";
static char __pyx_k_Writer__format_alt[] = "Writer._format_alt";
static char __pyx_k_Writer__format_info[] = "Writer._format_info";
static char __pyx_k_Writer_write_record[] = "Writer.write_record";
static char __pyx_k_vcf_metadata_parser[] = "_vcf_metadata_parser";
static char __pyx_k_Writer__write_header[] = "Writer._write_header";
static char __pyx_k_Writer__format_sample[] = "Writer._format_sample";
static char __pyx_k_Call_sample_s_GT_s_GQ_s[] = "Call(sample=%s, GT=%s, GQ=%s)";
static char __pyx_k_FILTER_ID_s_Description_s[] = "##FILTER=<ID=%s,Description=\"%s\">\n";
static char __pyx_k_vcf_metadata_parser___init[] = "_vcf_metadata_parser.__init__";
static char __pyx_k_The_number_of_heterozygotes[] = "The number of heterozygotes.";
static char __pyx_k_Return_the_name_of_the_sample[] = "Return the name of the sample";
static char __pyx_k_vcf_metadata_parser_read_info[] = "_vcf_metadata_parser.read_info";
static char __pyx_k_vcf_metadata_parser_read_meta[] = "_vcf_metadata_parser.read_meta";
static char __pyx_k_FORMAT_ID_P_id_Number_P_number[] = "\\#\\#FORMAT=<\n            ID=(?P<id>.+),\n            Number=(?P<number>-?\\d+|\\.|[AG]),\n            Type=(?P<type>.+),\n            Description=\"(?P<desc>.*)\"\n            >";
static char __pyx_k_INFO_ID_P_id_Number_P_number_d[] = "\\#\\#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_A_dict_of_INFO_attrs_defined_in[] = "A dict of INFO attrs defined in this VCF file.";
static char __pyx_k_Allele_number_not_found_in_list[] = "Allele number not found in list of alleles\n";
static char __pyx_k_CHROM_POS_ID_REF_ALT_QUAL_FILTE[] = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT";
static char __pyx_k_Expected_column_definition_line[] = "Expected column definition line beginning with #.  Not found - exiting.";
static char __pyx_k_FILTER_ID_P_id_Description_P_de[] = "\\#\\#FILTER=<\n            ID=(?P<id>[^,]+),\n            Description=\"(?P<desc>[^\"]*)\"\n            >";
static char __pyx_k_FORMAT_ID_s_Number_s_Type_s_Des[] = "##FORMAT=<ID=%s,Number=%s,Type=%s,Description=\"%s\">\n";
static char __pyx_k_INFO_ID_s_Number_s_Type_s_Descr[] = "##INFO=<ID=%s,Number=%s,Type=%s,Description=\"%s\">\n";
static char __pyx_k_Parse_the_metadat_in_the_header[] = "Parse the metadat in the header of a VCF file.";
static char __pyx_k_Return_the_VCF__Record_to_which[] = "Return the VCF _Record to which this _Call belongs";
static char __pyx_k_Users_arq5x_Documents_SourceCod[] = "/Users/arq5x/Documents/SourceCode/quinlan/CyVCF/cyvcf/parser.pyx";
static char __pyx_k_You_must_provide_at_least_fsock[] = "You must provide at least fsock or filename";
static char __pyx_k_vcf_metadata_parser_read_filter[] = "_vcf_metadata_parser.read_filter";
static char __pyx_k_vcf_metadata_parser_read_format[] = "_vcf_metadata_parser.read_format";
static char __pyx_k_A_dict_of_FILTER_attrs_defined_i[] = "A dict of FILTER attrs defined in this VCF file.";
static char __pyx_k_A_dict_of_FORMATS_defined_in_thi[] = "A dict of FORMATS defined in this VCF file.";
static char __pyx_k_A_list_of_Call_instances_one_for[] = "A list of Call instances: one for each sample";
static char __pyx_k_A_list_of_all_of_the_alleles_for[] = "A list of all of the alleles for this variant.\n           [0] = REF, [1:] = ALTS\n        ";
static char __pyx_k_A_list_of_booleans_indicating_wh[] = "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_A_list_of_integers_indicating_th[] = "A list of integers indicating the depth of sequence coverage for\n           each genotype.\n        ";
static char __pyx_k_A_list_of_nucleotide_genotypes_f[] = "A list of nucleotide genotypes for each sample.\n           E.g., ['A/G', 'A/A', 'G/G']\n        ";
static char __pyx_k_A_list_of_numerically_encoded_ge[] = "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_A_list_of_the_samples_in_this_VC[] = "A list of the samples in this VCF file.";
static char __pyx_k_Dump_the_raw_unparsed_header_lin[] = "Dump the raw, unparsed header lines";
static char __pyx_k_One_of_the_FILTER_lines_is_malfo[] = "One of the FILTER lines is malformed: %s";
static char __pyx_k_One_of_the_FORMAT_lines_is_malfo[] = "One of the FORMAT lines is malformed: %s";
static char __pyx_k_One_of_the_INFO_lines_is_malform[] = "One of the INFO lines is malformed: %s";
static char __pyx_k_Please_provide_a_filename_or_a_n[] = "Please provide a filename (or a \"normal\" fsock)";
static char __pyx_k_The_0_based_start_coordinate_for[] = "The 0-based start coordinate for the variant.";
static char __pyx_k_The_1_based_end_coordinate_for_t[] = "The 1-based end coordinate for the variant.";
static char __pyx_k_The_name_of_the_VCF_file_that_th[] = "The name of the VCF file that the Reader is reading.";
static char __pyx_k_The_number_of_called_i_e_NOT_gen[] = "The number of called (i.e., NOT ./.) genotypes.";
static char __pyx_k_The_number_of_homozygotes_for_an[] = "The number of homozygotes for an ALT allele.";
static char __pyx_k_The_number_of_homozygotes_for_th[] = "The number of homozygotes for the REF allele.";
static char __pyx_k_The_number_of_unknown_e_g_genoty[] = "The number of unknown (e.g., ./.) genotypes.";
static char __pyx_k_pysam_not_available_try_pip_inst[] = "pysam not available, try \"pip install pysam\"?";
static char __pyx_k_samples_gt_bases_gt_types_gt_pha[] = "samples, gt_bases,                                                     gt_types, gt_phases,                                                     gt_depths, gt_ref_depths,                                                     gt_alt_depths, gt_quals,                                                     gt_copy_numbers,                                                     num_hom_ref, num_het,                                                     num_hom_alt, num_unknown,                                                     num_called";
static char __pyx_k_A_list_of_integers_indicating_th_2[] = "A list of integers indicating the depth of sequence coverage for\n           the reference allele for each sample.\n        ";
static char __pyx_k_A_list_of_integers_indicating_th_3[] = "A list of integers indicating the depth of sequence coverage for\n           the alternate allele for each sample.\n        ";
static char __pyx_k_A_list_of_integers_indicating_th_4[] = "A list of integers indicating the PHRED scale genotype quality \n           for each sample.\n        ";
static char __pyx_k_A_list_of_integers_indicating_th_5[] = "A list of integers indicating the predicted copy number \n           for each sample.\n        ";
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_kp_s_Allele_number_not_found_in_list;
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_kp_s_CHROM_POS_ID_REF_ALT_QUAL_FILTE;
static PyObject *__pyx_n_s_CIGAR;
static PyObject *__pyx_n_s_CN;
static PyObject *__pyx_kp_s_Call_sample_s_GT_s_GQ_s;
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_kp_s_Expected_column_definition_line;
static PyObject *__pyx_n_s_FILTER;
static PyObject *__pyx_kp_s_FILTER_2;
static PyObject *__pyx_kp_s_FILTER_ID_P_id_Description_P_de;
static PyObject *__pyx_kp_s_FILTER_ID_s_Description_s;
static PyObject *__pyx_n_s_FORMAT;
static PyObject *__pyx_kp_s_FORMAT_2;
static PyObject *__pyx_kp_s_FORMAT_ID_P_id_Number_P_number;
static PyObject *__pyx_kp_s_FORMAT_ID_s_Number_s_Type_s_Des;
static PyObject *__pyx_n_s_FT;
static PyObject *__pyx_n_s_Filter;
static PyObject *__pyx_n_s_Filter_2;
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_s_Format_2;
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_kp_s_INFO_2;
static PyObject *__pyx_kp_s_INFO_ID_P_id_Number_P_number_d;
static PyObject *__pyx_kp_s_INFO_ID_s_Number_s_Type_s_Descr;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_Info;
static PyObject *__pyx_n_s_Info_2;
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_kp_s_One_of_the_FILTER_lines_is_malfo;
static PyObject *__pyx_kp_s_One_of_the_FORMAT_lines_is_malfo;
static PyObject *__pyx_kp_s_One_of_the_INFO_lines_is_malform;
static PyObject *__pyx_n_b_PASS;
static PyObject *__pyx_n_s_POS;
static PyObject *__pyx_kp_s_P_key_P_val;
static PyObject *__pyx_kp_s_Parse_the_metadat_in_the_header;
static PyObject *__pyx_kp_s_Please_provide_a_filename_or_a_n;
static PyObject *__pyx_n_s_QUAL;
static PyObject *__pyx_kp_s_README_rst;
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_SampleInfo_2;
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_kp_s_Users_arq5x_Documents_SourceCod;
static PyObject *__pyx_n_s_VALIDATED;
static PyObject *__pyx_n_s_VCFReader;
static PyObject *__pyx_n_s_VCFWriter;
static PyObject *__pyx_kp_s_VCF_Writer;
static PyObject *__pyx_n_s_VERBOSE;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Writer;
static PyObject *__pyx_n_s_Writer___init;
static PyObject *__pyx_n_s_Writer__format_alt;
static PyObject *__pyx_n_s_Writer__format_info;
static PyObject *__pyx_n_s_Writer__format_sample;
static PyObject *__pyx_n_s_Writer__map;
static PyObject *__pyx_n_s_Writer__stringify;
static PyObject *__pyx_n_s_Writer__write_header;
static PyObject *__pyx_n_s_Writer_write_record;
static PyObject *__pyx_kp_s_You_must_provide_at_least_fsock;
static PyObject *__pyx_kp_s__17;
static PyObject *__pyx_kp_b__19;
static PyObject *__pyx_kp_s__19;
static PyObject *__pyx_kp_s__20;
static PyObject *__pyx_kp_b__21;
static PyObject *__pyx_kp_s__21;
static PyObject *__pyx_kp_s__23;
static PyObject *__pyx_kp_s__24;
static PyObject *__pyx_kp_s__25;
static PyObject *__pyx_kp_s__27;
static PyObject *__pyx_kp_s__28;
static PyObject *__pyx_kp_s__29;
static PyObject *__pyx_kp_s__33;
static PyObject *__pyx_kp_s__35;
static PyObject *__pyx_kp_s__40;
static PyObject *__pyx_kp_s__45;
static PyObject *__pyx_kp_s__52;
static PyObject *__pyx_n_s_aaf;
static PyObject *__pyx_n_s_alt;
static PyObject *__pyx_n_s_args;
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_close;
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_cyvcf_parser;
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_doc;
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_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_alt;
static PyObject *__pyx_n_s_format_info;
static PyObject *__pyx_n_s_format_pattern;
static PyObject *__pyx_n_s_format_qual;
static PyObject *__pyx_n_s_format_sample;
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_get;
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_copy_number;
static PyObject *__pyx_n_s_gt_copy_numbers;
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_kp_s_gz;
static PyObject *__pyx_n_s_gzip;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_import;
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_init;
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_main;
static PyObject *__pyx_n_s_map;
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_metaclass;
static PyObject *__pyx_n_s_metadata;
static PyObject *__pyx_n_s_module;
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_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_prepare;
static PyObject *__pyx_n_s_prepend_chr;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_pysam;
static PyObject *__pyx_kp_s_pysam_not_available_try_pip_inst;
static PyObject *__pyx_n_s_qualname;
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_kp_s_s_s;
static PyObject *__pyx_kp_s_s_s_2;
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_kp_s_samples_gt_bases_gt_types_gt_pha;
static PyObject *__pyx_n_s_seek;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
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_stringify;
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_test;
static PyObject *__pyx_n_s_throw;
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_update_readme;
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_vcf_metadata_parser;
static PyObject *__pyx_n_s_vcf_metadata_parser___init;
static PyObject *__pyx_n_s_vcf_metadata_parser_read_filter;
static PyObject *__pyx_n_s_vcf_metadata_parser_read_format;
static PyObject *__pyx_n_s_vcf_metadata_parser_read_info;
static PyObject *__pyx_n_s_vcf_metadata_parser_read_meta;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_write_header;
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_float_0_0;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_2_0;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_9;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__42;
static PyObject *__pyx_slice__47;
static PyObject *__pyx_slice__62;
static PyObject *__pyx_slice__63;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__97;

/* "cyvcf/parser.pyx":47
 * 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=<
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":48
 *     '''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_GetModuleGlobalName(__pyx_n_s_vcf_metadata_parser); 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 = PyTuple_New(2); 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);
  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 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":49
 *     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_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":54
 *             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_GetModuleGlobalName(__pyx_n_s_re); 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_VERBOSE); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":49
 *     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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s_INFO_ID_P_id_Number_P_number_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_INFO_ID_P_id_Number_P_number_d);
  __Pyx_GIVEREF(__pyx_kp_s_INFO_ID_P_id_Number_P_number_d);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_info_pattern, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

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

  /* "cyvcf/parser.pyx":58
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.format_pattern = re.compile(r'''\#\#FORMAT=<
 *             ID=(?P<id>.+),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VERBOSE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":55
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.filter_pattern = re.compile(r'''\#\#FILTER=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s_FILTER_ID_P_id_Description_P_de);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_FILTER_ID_P_id_Description_P_de);
  __Pyx_GIVEREF(__pyx_kp_s_FILTER_ID_P_id_Description_P_de);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filter_pattern, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

  /* "cyvcf/parser.pyx":64
 *             Type=(?P<type>.+),
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); 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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_VERBOSE); 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;

  /* "cyvcf/parser.pyx":59
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.format_pattern = re.compile(r'''\#\#FORMAT=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>.+),
 *             Number=(?P<number>-?\d+|\.|[AG]),
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s_FORMAT_ID_P_id_Number_P_number);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_FORMAT_ID_P_id_Number_P_number);
  __Pyx_GIVEREF(__pyx_kp_s_FORMAT_ID_P_id_Number_P_number);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_format_pattern, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":65
 *             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_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_meta_pattern, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":47
 * 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=<
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":67
 *         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)
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 67; __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 = 67; __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 = 67; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":69
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __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 = 69; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":70
 *         '''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 = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":72
 *         if not match:
 *             raise SyntaxError(
 *                 "One of the INFO lines is malformed: %s" % info_string)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_One_of_the_INFO_lines_is_malform, __pyx_v_info_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "cyvcf/parser.pyx":71
 *         match = self.info_pattern.match(info_string)
 *         if not match:
 *             raise SyntaxError(             # <<<<<<<<<<<<<<
 *                 "One of the INFO lines is malformed: %s" % info_string)
 * 
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":74
 *                 "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":75
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_num = __pyx_t_3;
      __pyx_t_3 = 0;

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

        /* "cyvcf/parser.pyx":77
 *             num = int(match.group('number'))
 *             if num < 0:
 *                 num = None             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             num = None
 */
        __Pyx_INCREF(Py_None);
        __Pyx_DECREF_SET(__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_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":78
 *             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_3, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);

      /* "cyvcf/parser.pyx":79
 *                 num = None
 *         except ValueError:
 *             num = None             # <<<<<<<<<<<<<<
 * 
 *         info = _Info(match.group('id'), num,
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_num, Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __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":81
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":82
 * 
 *         info = _Info(match.group('id'), num,
 *                      match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), info)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":81
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_num);
  __Pyx_GIVEREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_3 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, 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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_info = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":84
 *                      match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), info)             # <<<<<<<<<<<<<<
 * 
 *     def read_filter(self, filter_string):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_info);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_info);
  __Pyx_GIVEREF(__pyx_v_info);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":67
 *         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)
 */

  /* function exit code */
  __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;
}

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

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 86; __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 = 86; __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 = 86; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":88
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_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 = 88; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":89
 *         '''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 = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":91
 *         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 = __Pyx_PyString_Format(__pyx_kp_s_One_of_the_FILTER_lines_is_malfo, __pyx_v_filter_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "cyvcf/parser.pyx":90
 *         match = self.filter_pattern.match(filter_string)
 *         if not match:
 *             raise SyntaxError(             # <<<<<<<<<<<<<<
 *                 "One of the FILTER lines is malformed: %s" % filter_string)
 * 
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__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 = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":93
 *                 "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_GetModuleGlobalName(__pyx_n_s_Filter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __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 = 93; __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 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_filt = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cyvcf/parser.pyx":95
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __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 = 95; __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 = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

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

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 97; __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 = 97; __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 = 97; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":99
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_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 = 99; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":100
 *         '''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 = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":102
 *         if not match:
 *             raise SyntaxError(
 *                 "One of the FORMAT lines is malformed: %s" % format_string)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_One_of_the_FORMAT_lines_is_malfo, __pyx_v_format_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "cyvcf/parser.pyx":101
 *         match = self.format_pattern.match(format_string)
 *         if not match:
 *             raise SyntaxError(             # <<<<<<<<<<<<<<
 *                 "One of the FORMAT lines is malformed: %s" % format_string)
 * 
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":104
 *                 "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":105
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_num = __pyx_t_3;
      __pyx_t_3 = 0;

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

        /* "cyvcf/parser.pyx":107
 *             num = int(match.group('number'))
 *             if num < 0:
 *                 num = None             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             num = None
 */
        __Pyx_INCREF(Py_None);
        __Pyx_DECREF_SET(__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_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":108
 *             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_3, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);

      /* "cyvcf/parser.pyx":109
 *                 num = None
 *         except ValueError:
 *             num = None             # <<<<<<<<<<<<<<
 * 
 *         form = _Format(match.group('id'), num,
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_num, Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __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":111
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__11, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":112
 * 
 *         form = _Format(match.group('id'), num,
 *                        match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), form)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":111
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_num);
  __Pyx_GIVEREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_3 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, 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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_form = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":114
 *                        match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), form)             # <<<<<<<<<<<<<<
 * 
 *     def read_meta(self, meta_string):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_form);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_form);
  __Pyx_GIVEREF(__pyx_v_form);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":116
 *         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')
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 116; __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 = 116; __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 = 116; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":117
 * 
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)             # <<<<<<<<<<<<<<
 *         return match.group('key'), match.group('val')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_meta_pattern); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); 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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); 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_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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":118
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __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 = 118; __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 = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":116
 *         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')
 */

  /* function exit code */
  __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;
}

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

/* 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 132; __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 = 132; __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 = 132; __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 = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_sample) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __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 = 132; __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 = 132; __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 = 132; __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);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":134
 *     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":136
 *         self.site = site
 *         #: The sample name
 *         self.sample = sample             # <<<<<<<<<<<<<<
 *         #: Dictionary of data from the VCF file
 *         self.data = data
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sample); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->sample);
  __Pyx_DECREF(__pyx_v_self->sample);
  __pyx_v_self->sample = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":138
 *         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(__pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __Pyx_GOTREF(__pyx_v_self->data);
  __Pyx_DECREF(__pyx_v_self->data);
  __pyx_v_self->data = __pyx_v_data;

  /* "cyvcf/parser.pyx":140
 *         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(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_GT); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_nums);
  __Pyx_DECREF(__pyx_v_self->gt_nums);
  __pyx_v_self->gt_nums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":142
 *         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":144
 *         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(__pyx_v_self->data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_GT); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_find); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __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 = 144; __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 = 144; __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":145
 *         # 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":147
 *             self.phased = 1
 *         else:
 *             self.phased = 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    __pyx_v_self->phased = 0;
  }
  __pyx_L3:;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":150
 * 
 *     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(__pyx_v_self->data == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->data, __pyx_n_s_GQ, __pyx_kp_s__19); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __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 = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->sample);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->sample);
  __Pyx_GIVEREF(__pyx_v_self->sample);
  __Pyx_INCREF(__pyx_v_self->gt_nums);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->gt_nums);
  __Pyx_GIVEREF(__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 = __Pyx_PyString_Format(__pyx_kp_s_Call_sample_s_GT_s_GQ_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":152
 *         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
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":157
 *         """
 *         # < 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) != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":158
 *         # < 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":159
 *         if op == 2: # 2
 *             return (self.site == other.site
 *                     and self.sample == other.sample             # <<<<<<<<<<<<<<
 *                     and self.gt_type == other.gt_type)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_site); 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);

    /* "cyvcf/parser.pyx":158
 *         # < 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_site); 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_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 = 158; __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 = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":159
 *         if op == 2: # 2
 *             return (self.site == other.site
 *                     and self.sample == other.sample             # <<<<<<<<<<<<<<
 *                     and self.gt_type == other.gt_type)
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sample); 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_sample); 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_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 = 159; __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 = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cyvcf/parser.pyx":160
 *             return (self.site == other.site
 *                     and self.sample == other.sample
 *                     and self.gt_type == other.gt_type)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __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 = 160; __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;
  }

  /* "cyvcf/parser.pyx":152
 *         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
 */

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->sample);
  __pyx_r = __pyx_v_self->sample;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->data);
  __pyx_r = __pyx_v_self->data;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_bases", 0);

  /* "cyvcf/parser.pyx":189
 *         '''
 *         # 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 '|'
 */
  __pyx_t_1 = (__pyx_v_self->called != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":191
 *         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 != 0)) != 0)) {
      __Pyx_INCREF(__pyx_kp_s__20);
      __pyx_t_2 = __pyx_kp_s__20;
    } else {
      __Pyx_INCREF(__pyx_kp_s__17);
      __pyx_t_2 = __pyx_kp_s__17;
    }
    __pyx_v_phase_char = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":192
 *             # 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->gt_nums, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_phase_char);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_phase_char);
    __Pyx_GIVEREF(__pyx_v_phase_char);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_alleles = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":194
 *             alleles = self.gt_nums.split(phase_char)
 *             # lookup and return the actual DNA alleles
 *             try:             # <<<<<<<<<<<<<<
 *                 return phase_char.join([self.site.alleles[int(a)] \
 *                                         if a != '.' else '.' for a in alleles])
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "cyvcf/parser.pyx":195
 *             # lookup and return the actual DNA alleles
 *             try:
 *                 return phase_char.join([self.site.alleles[int(a)] \             # <<<<<<<<<<<<<<
 *                                         if a != '.' else '.' for a in alleles])
 *             except KeyError:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_phase_char, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_3);

        /* "cyvcf/parser.pyx":196
 *             try:
 *                 return phase_char.join([self.site.alleles[int(a)] \
 *                                         if a != '.' else '.' for a in alleles])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 sys.stderr.write("Allele number not found in list of alleles\n")
 */
        if (PyList_CheckExact(__pyx_v_alleles) || PyTuple_CheckExact(__pyx_v_alleles)) {
          __pyx_t_2 = __pyx_v_alleles; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alleles); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
        }
        for (;;) {
          if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #endif
          } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            #endif
          } else {
            __pyx_t_10 = __pyx_t_9(__pyx_t_2);
            if (unlikely(!__pyx_t_10)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_10);
          }
          __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_10);
          __pyx_t_10 = 0;

          /* "cyvcf/parser.pyx":195
 *             # lookup and return the actual DNA alleles
 *             try:
 *                 return phase_char.join([self.site.alleles[int(a)] \             # <<<<<<<<<<<<<<
 *                                         if a != '.' else '.' for a in alleles])
 *             except KeyError:
 */
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_a, __pyx_kp_s__21, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          if (__pyx_t_1) {
            if (unlikely(__pyx_v_self->site->alleles == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            }
            __pyx_t_11 = PyNumber_Int(__pyx_v_a); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = PyObject_GetItem(__pyx_v_self->site->alleles, __pyx_t_11); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_10 = __pyx_t_12;
            __pyx_t_12 = 0;
          } else {
            __Pyx_INCREF(__pyx_kp_s__21);
            __pyx_t_10 = __pyx_kp_s__21;
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L8_try_return;
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L11_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

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

        /* "cyvcf/parser.pyx":198
 *                                         if a != '.' else '.' for a in alleles])
 *             except KeyError:
 *                 sys.stderr.write("Allele number not found in list of alleles\n")             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
        __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_stderr); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_write); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L8_try_return:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L0;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L11_try_end:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":200
 *                 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:;

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

  /* function exit code */
  __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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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
  int __pyx_t_1;
  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 *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_type", 0);

  /* "cyvcf/parser.pyx":215
 *         '''
 *         # 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":216
 *         # 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 '|'
 */
  __pyx_t_1 = (__pyx_v_self->called != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":218
 *         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 != 0)) != 0)) {
      __Pyx_INCREF(__pyx_kp_s__20);
      __pyx_t_2 = __pyx_kp_s__20;
    } else {
      __Pyx_INCREF(__pyx_kp_s__17);
      __pyx_t_2 = __pyx_kp_s__17;
    }
    __pyx_v_phase_char = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":219
 *             # 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)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->gt_nums, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_phase_char);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_phase_char);
    __Pyx_GIVEREF(__pyx_v_phase_char);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_alleles = __pyx_t_4;
    __pyx_t_4 = 0;

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

      /* "cyvcf/parser.pyx":223
 * 
 *             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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_2 = PyObject_GetIter(__pyx_v_alleles); 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_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = NULL;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L6_unpacking_done;
        __pyx_L5_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_6 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L6_unpacking_done:;
      }
      __pyx_v_a1 = __pyx_t_4;
      __pyx_t_4 = 0;
      __pyx_v_a2 = __pyx_t_3;
      __pyx_t_3 = 0;

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

        /* "cyvcf/parser.pyx":225
 *                 (a1, a2) = alleles
 *                 if a1 == a2:
 *                     if a1 == "0":             # <<<<<<<<<<<<<<
 *                         gt_type = HOM_REF
 *                     else:
 */
        __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_a1, __pyx_kp_s_0, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {

          /* "cyvcf/parser.pyx":226
 *                 if a1 == a2:
 *                     if a1 == "0":
 *                         gt_type = HOM_REF             # <<<<<<<<<<<<<<
 *                     else:
 *                         gt_type = HOM_ALT
 */
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HOM_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF_SET(__pyx_v_gt_type, __pyx_t_3);
          __pyx_t_3 = 0;
          goto __pyx_L8;
        }
        /*else*/ {

          /* "cyvcf/parser.pyx":228
 *                         gt_type = HOM_REF
 *                     else:
 *                         gt_type = HOM_ALT             # <<<<<<<<<<<<<<
 *                 else:
 *                     gt_type = HET
 */
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HOM_ALT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF_SET(__pyx_v_gt_type, __pyx_t_3);
          __pyx_t_3 = 0;
        }
        __pyx_L8:;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":230
 *                         gt_type = HOM_ALT
 *                 else:
 *                     gt_type = HET             # <<<<<<<<<<<<<<
 *             elif len(alleles) == 1:
 *                 if alleles[0] == "0":
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HET); 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_SET(__pyx_v_gt_type, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L7:;
      goto __pyx_L4;
    }

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

      /* "cyvcf/parser.pyx":232
 *                     gt_type = HET
 *             elif len(alleles) == 1:
 *                 if alleles[0] == "0":             # <<<<<<<<<<<<<<
 *                     gt_type = HOM_REF
 *                 else:
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_alleles, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_0, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

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

        /* "cyvcf/parser.pyx":235
 *                     gt_type = HOM_REF
 *                 else:
 *                     gt_type = HOM_ALT             # <<<<<<<<<<<<<<
 * 
 *         return gt_type
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HOM_ALT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__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":237
 *                     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;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_depth", 0);

  /* "cyvcf/parser.pyx":245
 *         '''
 *         # 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":246
 *         # extract the numeric alleles of the gt string
 *         try:
 *             depth = self.data['DP']             # <<<<<<<<<<<<<<
 *             if depth is not None:
 *                 return depth
 */
      if (unlikely(__pyx_v_self->data == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_DP); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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":247
 *         try:
 *             depth = self.data['DP']
 *             if depth is not None:             # <<<<<<<<<<<<<<
 *                 return depth
 *             else:
 */
      __pyx_t_5 = (__pyx_v_depth != Py_None);
      __pyx_t_6 = (__pyx_t_5 != 0);
      if (__pyx_t_6) {

        /* "cyvcf/parser.pyx":248
 *             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;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":250
 *                 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_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;

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

      /* "cyvcf/parser.pyx":252
 *                 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_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __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_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_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:;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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":260
 *         '''
 *         # extract the numeric alleles of the gt string
 *         if 'AD' in self.data:             # <<<<<<<<<<<<<<
 *             depths = self.data['AD']
 *             if depths is not None:
 */
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_AD, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":261
 *         # 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(__pyx_v_self->data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_AD); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_depths = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":262
 *         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_2 = (__pyx_v_depths != Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":264
 *             if depths is not None:
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:             # <<<<<<<<<<<<<<
 *                     return -1
 *                 else:
 */
      __pyx_t_1 = PyList_Check(__pyx_v_depths); 
      if (!__pyx_t_1) {
        __pyx_t_2 = PyTuple_Check(__pyx_v_depths); 
        __pyx_t_4 = __pyx_t_2;
      } else {
        __pyx_t_4 = __pyx_t_1;
      }
      __pyx_t_1 = ((!(__pyx_t_4 != 0)) != 0);
      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 = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = ((__pyx_t_5 != 2) != 0);
        __pyx_t_2 = __pyx_t_4;
      } else {
        __pyx_t_2 = __pyx_t_1;
      }
      if (__pyx_t_2) {

        /* "cyvcf/parser.pyx":265
 *                 # 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;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":268
 *                 else:
 *                     # ref allele is first
 *                     return depths[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_depths, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":270
 *                     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;
    }
  }

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

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

      /* "cyvcf/parser.pyx":273
 *         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(__pyx_v_self->data == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_RO); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":275
 *                 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;
    }
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":277
 *                 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;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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_v_depth = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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":287
 * 
 *         # GATK style
 *         if 'AD' in self.data:             # <<<<<<<<<<<<<<
 *             depths = self.data['AD']
 *             if depths is not None:
 */
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_AD, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":288
 *         # GATK style
 *         if 'AD' in self.data:
 *             depths = self.data['AD']             # <<<<<<<<<<<<<<
 *             if depths is not None:
 *                 # require bi-allelic
 */
    if (unlikely(__pyx_v_self->data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_AD); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_depths = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":289
 *         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_2 = (__pyx_v_depths != Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":291
 *             if depths is not None:
 *                 # require bi-allelic
 *                 if not isinstance(depths, (list, tuple)) or len(depths) != 2:             # <<<<<<<<<<<<<<
 *                     return -1
 *                 else:
 */
      __pyx_t_1 = PyList_Check(__pyx_v_depths); 
      if (!__pyx_t_1) {
        __pyx_t_2 = PyTuple_Check(__pyx_v_depths); 
        __pyx_t_4 = __pyx_t_2;
      } else {
        __pyx_t_4 = __pyx_t_1;
      }
      __pyx_t_1 = ((!(__pyx_t_4 != 0)) != 0);
      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 = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = ((__pyx_t_5 != 2) != 0);
        __pyx_t_2 = __pyx_t_4;
      } else {
        __pyx_t_2 = __pyx_t_1;
      }
      if (__pyx_t_2) {

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

        /* "cyvcf/parser.pyx":295
 *                 else:
 *                     # alt allele is second
 *                     return depths[1]             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_depths, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }
    }
    /*else*/ {

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

  /* "cyvcf/parser.pyx":299
 *                 return -1
 *         # Freebayes style
 *         elif 'AO' in self.data:             # <<<<<<<<<<<<<<
 *             depth = self.data['AO']
 *             if depth is not None:
 */
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = (__Pyx_PyDict_Contains(__pyx_n_s_AO, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":300
 *         # Freebayes style
 *         elif 'AO' in self.data:
 *             depth = self.data['AO']             # <<<<<<<<<<<<<<
 *             if depth is not None:
 *                 # require bi-allelic
 */
    if (unlikely(__pyx_v_self->data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_AO); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_depth = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":301
 *         elif 'AO' in self.data:
 *             depth = self.data['AO']
 *             if depth is not None:             # <<<<<<<<<<<<<<
 *                 # require bi-allelic
 *                 if isinstance(depth, list):
 */
    __pyx_t_1 = (__pyx_v_depth != Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":303
 *             if depth is not None:
 *                 # require bi-allelic
 *                 if isinstance(depth, list):             # <<<<<<<<<<<<<<
 *                     return -1
 *                 else:
 */
      __pyx_t_2 = PyList_Check(__pyx_v_depth); 
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {

        /* "cyvcf/parser.pyx":304
 *                 # require bi-allelic
 *                 if isinstance(depth, list):
 *                     return -1             # <<<<<<<<<<<<<<
 *                 else:
 *                     return depth
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_r = __pyx_int_neg_1;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":306
 *                     return -1
 *                 else:
 *                     return depth             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_depth);
        __pyx_r = __pyx_v_depth;
        goto __pyx_L0;
      }
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":308
 *                     return depth
 *             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;
    }
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":310
 *                 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;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __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_XDECREF(__pyx_v_depth);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_qual", 0);

  /* "cyvcf/parser.pyx":318
 *         '''
 *         # 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":319
 *         # extract the numeric alleles of the gt string
 *         try:
 *             qual = self.data['GQ']             # <<<<<<<<<<<<<<
 *             if qual is not None:
 *                 return qual
 */
      if (unlikely(__pyx_v_self->data == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_GQ); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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":320
 *         try:
 *             qual = self.data['GQ']
 *             if qual is not None:             # <<<<<<<<<<<<<<
 *                 return qual
 *             else:
 */
      __pyx_t_5 = (__pyx_v_qual != Py_None);
      __pyx_t_6 = (__pyx_t_5 != 0);
      if (__pyx_t_6) {

        /* "cyvcf/parser.pyx":321
 *             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;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":323
 *                 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_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;

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

      /* "cyvcf/parser.pyx":325
 *                 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_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __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_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_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:;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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;
}

/* "cyvcf/parser.pyx":328
 * 
 *     @property
 *     def gt_copy_number(self):             # <<<<<<<<<<<<<<
 *         '''The copy number prediction for this sample.
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_21gt_copy_number(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_20gt_copy_number[] = "The copy number prediction for this sample.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_21gt_copy_number(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt_copy_number (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_20gt_copy_number(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_20gt_copy_number(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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt_copy_number", 0);

  /* "cyvcf/parser.pyx":332
 *         '''
 *         # extract the numeric alleles of the gt string
 *         try:             # <<<<<<<<<<<<<<
 *             qual = self.data['CN']
 *             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":333
 *         # extract the numeric alleles of the gt string
 *         try:
 *             qual = self.data['CN']             # <<<<<<<<<<<<<<
 *             if qual is not None:
 *                 return qual
 */
      if (unlikely(__pyx_v_self->data == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_CN); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __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":334
 *         try:
 *             qual = self.data['CN']
 *             if qual is not None:             # <<<<<<<<<<<<<<
 *                 return qual
 *             else:
 */
      __pyx_t_5 = (__pyx_v_qual != Py_None);
      __pyx_t_6 = (__pyx_t_5 != 0);
      if (__pyx_t_6) {

        /* "cyvcf/parser.pyx":335
 *             qual = self.data['CN']
 *             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;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":337
 *                 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_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;

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

      /* "cyvcf/parser.pyx":339
 *                 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_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __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_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_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:;
  }

  /* "cyvcf/parser.pyx":328
 * 
 *     @property
 *     def gt_copy_number(self):             # <<<<<<<<<<<<<<
 *         '''The copy number prediction for this sample.
 *         '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_copy_number", __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;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_23is_variant(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_22is_variant[] = " Return True if not a reference call ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_23is_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_22is_variant(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_22is_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":344
 *     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 != 0)) != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":345
 *         """ 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;
  }

  /* "cyvcf/parser.pyx":346
 *         if not self.called:
 *             return None
 *         return self.gt_type != HOM_REF             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HOM_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __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 = 346; __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;

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

  /* function exit code */
  __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;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_25is_het(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_24is_het[] = " Return True for heterozygous calls ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_25is_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_24is_het(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_24is_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":351
 *     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 != 0)) != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":352
 *         """ 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;
  }

  /* "cyvcf/parser.pyx":353
 *         if not self.called:
 *             return None
 *         return self.gt_type == HET             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HET); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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 = 353; __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;

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

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":379
 *     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,
 */

/* 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;
  PyObject *__pyx_v_gt_copy_numbers = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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_gt_copy_numbers,&__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[24] = {0,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":380
 * 
 *     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":381
 *     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":382
 *                         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":383
 *                         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":384
 *                         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, list gt_copy_numbers=None, int num_hom_ref=0,
 */
    values[13] = ((PyObject*)Py_None);
    values[14] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":385
 *                         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, list gt_copy_numbers=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":386
 *                         list gt_phases=None, list gt_depths=None,
 *                         list gt_ref_depths=None, list gt_alt_depths=None,
 *                         list gt_quals=None, list gt_copy_numbers=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);
    values[18] = ((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 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
        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, 24, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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, 24, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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, 24, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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, 24, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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_gt_copy_numbers);
          if (value) { values[18] = value; kw_args--; }
        }
        case 19:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_hom_ref);
          if (value) { values[19] = value; kw_args--; }
        }
        case 20:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_het);
          if (value) { values[20] = value; kw_args--; }
        }
        case 21:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_hom_alt);
          if (value) { values[21] = value; kw_args--; }
        }
        case 22:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_unknown);
          if (value) { values[22] = value; kw_args--; }
        }
        case 23:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_called);
          if (value) { values[23] = 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 = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
        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 = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_CHROM) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_POS = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_POS == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ID = __Pyx_PyObject_AsString(values[2]); if (unlikely((!__pyx_v_ID) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_REF = __Pyx_PyObject_AsString(values[3]); if (unlikely((!__pyx_v_REF) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __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]);
    __pyx_v_gt_copy_numbers = ((PyObject*)values[18]);
    if (values[19]) {
      __pyx_v_num_hom_ref = __Pyx_PyInt_As_int(values[19]); if (unlikely((__pyx_v_num_hom_ref == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_hom_ref = ((int)0);
    }
    if (values[20]) {
      __pyx_v_num_het = __Pyx_PyInt_As_int(values[20]); if (unlikely((__pyx_v_num_het == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_het = ((int)0);
    }
    if (values[21]) {
      __pyx_v_num_hom_alt = __Pyx_PyInt_As_int(values[21]); if (unlikely((__pyx_v_num_hom_alt == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_hom_alt = ((int)0);
    }
    if (values[22]) {
      __pyx_v_num_unknown = __Pyx_PyInt_As_int(values[22]); if (unlikely((__pyx_v_num_unknown == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_unknown = ((int)0);
    }
    if (values[23]) {
      __pyx_v_num_called = __Pyx_PyInt_As_int(values[23]); if (unlikely((__pyx_v_num_called == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __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, 24, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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 = 380; __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 = 381; __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 = 382; __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 = 382; __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 = 383; __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 = 383; __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 = 384; __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 = 384; __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 = 385; __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 = 385; __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 = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_copy_numbers), (&PyList_Type), 1, "gt_copy_numbers", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __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_gt_copy_numbers, __pyx_v_num_hom_ref, __pyx_v_num_het, __pyx_v_num_hom_alt, __pyx_v_num_unknown, __pyx_v_num_called);

  /* "cyvcf/parser.pyx":379
 *     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,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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, PyObject *__pyx_v_gt_copy_numbers, 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;
  int __pyx_t_3;
  int __pyx_t_4;
  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":390
 *                         int num_unknown=0, int num_called=0):
 *         # CORE VCF fields
 *         self.CHROM = CHROM             # <<<<<<<<<<<<<<
 *         self.POS = POS
 *         self.ID = ID
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_CHROM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->CHROM);
  __Pyx_DECREF(__pyx_v_self->CHROM);
  __pyx_v_self->CHROM = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

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

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

  /* "cyvcf/parser.pyx":395
 *         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":396
 *         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":397
 *         self.QUAL = QUAL
 *         self.FILTER = FILTER
 *         self.INFO = INFO             # <<<<<<<<<<<<<<
 *         self.FORMAT = FORMAT
 *         # DERIVED fields
 */
  __Pyx_INCREF(__pyx_v_INFO);
  __Pyx_GIVEREF(__pyx_v_INFO);
  __Pyx_GOTREF(__pyx_v_self->INFO);
  __Pyx_DECREF(__pyx_v_self->INFO);
  __pyx_v_self->INFO = __pyx_v_INFO;

  /* "cyvcf/parser.pyx":398
 *         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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_FORMAT)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_FORMAT;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->FORMAT);
  __Pyx_DECREF(__pyx_v_self->FORMAT);
  __pyx_v_self->FORMAT = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":400
 *         self.FORMAT = FORMAT
 *         # DERIVED fields
 *         self.start = self.POS - 1             # <<<<<<<<<<<<<<
 *         self.end = self.start + len(self.REF)
 *         if 'END' in self.INFO:
 */
  __pyx_v_self->start = (__pyx_v_self->POS - 1);

  /* "cyvcf/parser.pyx":401
 *         # DERIVED fields
 *         self.start = self.POS - 1
 *         self.end = self.start + len(self.REF)             # <<<<<<<<<<<<<<
 *         if 'END' in self.INFO:
 *              self.end = self.INFO['END']
 */
  __pyx_t_1 = __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 = 401; __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 = 401; __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":402
 *         self.start = self.POS - 1
 *         self.end = self.start + len(self.REF)
 *         if 'END' in self.INFO:             # <<<<<<<<<<<<<<
 *              self.end = self.INFO['END']
 *         else:
 */
  if (unlikely(__pyx_v_self->INFO == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_n_s_END, __pyx_v_self->INFO, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":403
 *         self.end = self.start + len(self.REF)
 *         if 'END' in self.INFO:
 *              self.end = self.INFO['END']             # <<<<<<<<<<<<<<
 *         else:
 *              self.end = self.start + len(self.REF)
 */
    if (unlikely(__pyx_v_self->INFO == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->INFO, __pyx_n_s_END); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->end = __pyx_t_5;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":405
 *              self.end = self.INFO['END']
 *         else:
 *              self.end = self.start + len(self.REF)             # <<<<<<<<<<<<<<
 *         self.alleles = [self.REF]
 *         self.alleles.extend(self.ALT)
 */
    __pyx_t_1 = __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 = 405; __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 = 405; __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);
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":406
 *         else:
 *              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 = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->REF);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->REF);
  __Pyx_GIVEREF(__pyx_v_self->REF);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->alleles);
  __Pyx_DECREF(__pyx_v_self->alleles);
  __pyx_v_self->alleles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":407
 *              self.end = self.start + len(self.REF)
 *         self.alleles = [self.REF]
 *         self.alleles.extend(self.ALT)             # <<<<<<<<<<<<<<
 *         self.samples = samples
 *         self._sample_indexes = sample_indexes
 */
  if (unlikely(__pyx_v_self->alleles == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "extend");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __pyx_v_self->ALT;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_self->alleles, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

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

  /* "cyvcf/parser.pyx":409
 *         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(__pyx_v_sample_indexes);
  __Pyx_GIVEREF(__pyx_v_sample_indexes);
  __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
  __Pyx_DECREF(__pyx_v_self->_sample_indexes);
  __pyx_v_self->_sample_indexes = __pyx_v_sample_indexes;

  /* "cyvcf/parser.pyx":410
 *         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(__pyx_v_gt_bases);
  __Pyx_GIVEREF(__pyx_v_gt_bases);
  __Pyx_GOTREF(__pyx_v_self->gt_bases);
  __Pyx_DECREF(__pyx_v_self->gt_bases);
  __pyx_v_self->gt_bases = __pyx_v_gt_bases;

  /* "cyvcf/parser.pyx":411
 *         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(__pyx_v_gt_types);
  __Pyx_GIVEREF(__pyx_v_gt_types);
  __Pyx_GOTREF(__pyx_v_self->gt_types);
  __Pyx_DECREF(__pyx_v_self->gt_types);
  __pyx_v_self->gt_types = __pyx_v_gt_types;

  /* "cyvcf/parser.pyx":412
 *         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(__pyx_v_gt_phases);
  __Pyx_GIVEREF(__pyx_v_gt_phases);
  __Pyx_GOTREF(__pyx_v_self->gt_phases);
  __Pyx_DECREF(__pyx_v_self->gt_phases);
  __pyx_v_self->gt_phases = __pyx_v_gt_phases;

  /* "cyvcf/parser.pyx":413
 *         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(__pyx_v_gt_depths);
  __Pyx_GIVEREF(__pyx_v_gt_depths);
  __Pyx_GOTREF(__pyx_v_self->gt_depths);
  __Pyx_DECREF(__pyx_v_self->gt_depths);
  __pyx_v_self->gt_depths = __pyx_v_gt_depths;

  /* "cyvcf/parser.pyx":414
 *         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(__pyx_v_gt_ref_depths);
  __Pyx_GIVEREF(__pyx_v_gt_ref_depths);
  __Pyx_GOTREF(__pyx_v_self->gt_ref_depths);
  __Pyx_DECREF(__pyx_v_self->gt_ref_depths);
  __pyx_v_self->gt_ref_depths = __pyx_v_gt_ref_depths;

  /* "cyvcf/parser.pyx":415
 *         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.gt_copy_numbers = gt_copy_numbers
 */
  __Pyx_INCREF(__pyx_v_gt_alt_depths);
  __Pyx_GIVEREF(__pyx_v_gt_alt_depths);
  __Pyx_GOTREF(__pyx_v_self->gt_alt_depths);
  __Pyx_DECREF(__pyx_v_self->gt_alt_depths);
  __pyx_v_self->gt_alt_depths = __pyx_v_gt_alt_depths;

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

  /* "cyvcf/parser.pyx":417
 *         self.gt_alt_depths = gt_alt_depths
 *         self.gt_quals = gt_quals
 *         self.gt_copy_numbers = gt_copy_numbers             # <<<<<<<<<<<<<<
 *         self.num_hom_ref = num_hom_ref
 *         self.num_het = num_het
 */
  __Pyx_INCREF(__pyx_v_gt_copy_numbers);
  __Pyx_GIVEREF(__pyx_v_gt_copy_numbers);
  __Pyx_GOTREF(__pyx_v_self->gt_copy_numbers);
  __Pyx_DECREF(__pyx_v_self->gt_copy_numbers);
  __pyx_v_self->gt_copy_numbers = __pyx_v_gt_copy_numbers;

  /* "cyvcf/parser.pyx":418
 *         self.gt_quals = gt_quals
 *         self.gt_copy_numbers = gt_copy_numbers
 *         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":419
 *         self.gt_copy_numbers = gt_copy_numbers
 *         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":420
 *         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":421
 *         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":422
 *         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":423
 *         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_4 = (__pyx_v_self->FORMAT != ((PyObject*)Py_None));
  if ((__pyx_t_4 != 0)) {
    __pyx_t_3 = (__pyx_v_sample_indexes != ((PyObject*)Py_None));
    __pyx_t_7 = (__pyx_t_3 != 0);
  } else {
    __pyx_t_7 = (__pyx_t_4 != 0);
  }
  if (__pyx_t_7) {

    /* "cyvcf/parser.pyx":424
 *         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_L4;
  }
  /*else*/ {

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

  /* "cyvcf/parser.pyx":379
 *     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,
 */

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

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":432
 * 
 *         # < 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) != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":433
 *         # < 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_CHROM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_CHROM); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __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 = 433; __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 = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":434
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_POS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __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 = 434; __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 = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cyvcf/parser.pyx":435
 *             return (self.CHROM == other.CHROM and
 *                     self.POS == other.POS and
 *                     self.REF == other.REF and             # <<<<<<<<<<<<<<
 *                     self.ALT == other.ALT)
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_REF); 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_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 = 435; __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 = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "cyvcf/parser.pyx":436
 *                     self.POS == other.POS and
 *                     self.REF == other.REF and
 *                     self.ALT == other.ALT)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ALT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_ALT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __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 = 436; __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;
  }

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":439
 * 
 *     def __iter__(self):
 *         return iter(self.samples)             # <<<<<<<<<<<<<<
 * 
 *     def _format_alt(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __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 = 439; __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;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  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("_format_alt", 0);

  /* "cyvcf/parser.pyx":442
 * 
 *     def _format_alt(self):
 *         return ','.join([x or '.' for x in self.ALT])             # <<<<<<<<<<<<<<
 * 
 *     def _format_qual(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_self->ALT == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __pyx_v_self->ALT; __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 = 442; __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 = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_x); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_5) {
      __Pyx_INCREF(__pyx_kp_s__21);
      __pyx_t_4 = __pyx_kp_s__21;
    } else {
      __Pyx_INCREF(__pyx_v_x);
      __pyx_t_4 = __pyx_v_x;
    }
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_t_1); 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_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
}

/* "cyvcf/parser.pyx":444
 *         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
 * 
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":445
 * 
 *     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 != 0)) {
    __pyx_t_3 = PyTuple_New(1); 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_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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__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;

  /* "cyvcf/parser.pyx":444
 *         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
 * 
 */

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_info", 0);

  /* "cyvcf/parser.pyx":448
 * 
 *     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(__pyx_v_self->INFO); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":449
 *     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(__pyx_kp_s__21);
    __pyx_r = __pyx_kp_s__21;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":450
 *         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 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(__pyx_v_self->INFO == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_PyDict_Items(__pyx_v_self->INFO); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __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_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #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 = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stringify); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_y);
    __Pyx_GIVEREF(__pyx_v_y);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__24, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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;
}

/* "cyvcf/parser.pyx":452
 *         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 "./."
 */

/* 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));

  /* function exit code */
  __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":455
 *         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_tp_new_5cyvcf_6parser___pyx_scope_struct_1_genexpr(__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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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 = 455; __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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_2);
    __Pyx_GIVEREF(__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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((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 = 455; __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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__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 = 455; __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 (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __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 = 455; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  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":452
 *         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;
  int __pyx_t_4;
  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_tp_new_5cyvcf_6parser___pyx_scope_struct___format_sample(__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":453
 * 
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sample, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_GT); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __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;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":454
 *     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(__pyx_kp_s__27);
    __pyx_r = __pyx_kp_s__27;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":455
 *         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 = __pyx_pf_5cyvcf_6parser_7_Record_14_format_sample_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__25, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":452
 *         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 "./."
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __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;
}

/* "cyvcf/parser.pyx":457
 *         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))
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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__21);
    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 = 457; __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 = 457; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_stringify", 0);

  /* "cyvcf/parser.pyx":458
 * 
 *     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 = 458; __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(__pyx_t_1)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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 = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":459
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); 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_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __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_x);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(__pyx_v_none);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_none);
    __Pyx_GIVEREF(__pyx_v_none);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":460
 *         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 != 0)) {
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_none);
    __pyx_t_1 = __pyx_v_none;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":457
 *         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))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
}

/* "cyvcf/parser.pyx":462
 *         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
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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__21);
    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 = 462; __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 = 462; __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 = 462; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":464
 *     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 = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":465
 *         '''``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 = 465; __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 = 465; __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 = 465; __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 = 465; __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 = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":464
 *     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 != 0)) {
      __pyx_t_7 = PyTuple_New(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_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_func, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {

      /* "cyvcf/parser.pyx":465
 *         '''``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_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":462
 *         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
 */

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":468
 * 
 *     def __repr__(self):
 *         if self.has_genotypes == True:             # <<<<<<<<<<<<<<
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.ID), 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) != 0);
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":469
 *     def __repr__(self):
 *         if self.has_genotypes == True:
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.ID), 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 = __Pyx_PyInt_From_int(__pyx_v_self->POS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__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_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_self->ID);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->ID);
    __Pyx_GIVEREF(__pyx_v_self->ID);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_self->REF);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->REF);
    __Pyx_GIVEREF(__pyx_v_self->REF);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_alt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":470
 *         if self.has_genotypes == True:
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.ID), 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_qual); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_s__21);
      __pyx_t_3 = __pyx_kp_s__21;
    } else {
      __pyx_t_3 = __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 = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_INCREF(__pyx_kp_s__21);
      __pyx_t_7 = __pyx_kp_s__21;
    } else {
      __Pyx_INCREF(__pyx_v_self->FILTER);
      __pyx_t_7 = __pyx_v_self->FILTER;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":469
 *     def __repr__(self):
 *         if self.has_genotypes == True:
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.ID), 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_8 = PyList_New(9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->CHROM);
    __Pyx_GIVEREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_8, 4, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_8, 5, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_8, 7, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_self->FORMAT);
    PyList_SET_ITEM(__pyx_t_8, 8, __pyx_v_self->FORMAT);
    __Pyx_GIVEREF(__pyx_v_self->FORMAT);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = 0;
    __pyx_t_7 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__28, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_core = ((PyObject*)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "cyvcf/parser.pyx":471
 *             core = "\t".join([self.CHROM, str(self.POS), str(self.ID), 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_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(__pyx_v_self->samples == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = __pyx_v_self->samples; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_sample); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_sample);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sample);
      __Pyx_GIVEREF(__pyx_v_sample);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__28, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_samples = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":472
 *                           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.ID), str(self.REF), self._format_alt(),
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyNumber_Add(__pyx_v_core, __pyx_kp_s__28); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_v_samples); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_9;
    __pyx_t_9 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":474
 *             return core + "\t" + samples
 *         else:
 *             return "\t".join([self.CHROM, str(self.POS), str(self.ID), str(self.REF), self._format_alt(),             # <<<<<<<<<<<<<<
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info()])
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->POS); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __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 = 474; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_self->ID);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->ID);
    __Pyx_GIVEREF(__pyx_v_self->ID);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_self->REF);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->REF);
    __Pyx_GIVEREF(__pyx_v_self->REF);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_alt); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":475
 *         else:
 *             return "\t".join([self.CHROM, str(self.POS), str(self.ID), str(self.REF), self._format_alt(),
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info()])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_qual); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_s__21);
      __pyx_t_8 = __pyx_kp_s__21;
    } else {
      __pyx_t_8 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->FILTER); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_INCREF(__pyx_kp_s__21);
      __pyx_t_5 = __pyx_kp_s__21;
    } else {
      __Pyx_INCREF(__pyx_v_self->FILTER);
      __pyx_t_5 = __pyx_v_self->FILTER;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":474
 *             return core + "\t" + samples
 *         else:
 *             return "\t".join([self.CHROM, str(self.POS), str(self.ID), str(self.REF), self._format_alt(),             # <<<<<<<<<<<<<<
 *                           self._format_qual() or '.', self.FILTER or '.', self._format_info()])
 * 
 */
    __pyx_t_4 = PyList_New(8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->CHROM);
    __Pyx_GIVEREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_4, 4, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_4, 5, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_4, 6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_4, 7, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__28, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

#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":479
 * 
 *     def __cmp__(self, other):
 *         return cmp( (self.CHROM, self.POS), (other.CHROM, other.POS))             # <<<<<<<<<<<<<<
 * 
 *     def add_format(self, fmt):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->POS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __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 = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->CHROM);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->CHROM);
  __Pyx_GIVEREF(__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 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_CHROM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __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 = 479; __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 = 479; __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);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_cmp, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

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

  /* function exit code */
  __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)*/

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":482
 * 
 *     def add_format(self, fmt):
 *         tmp = self.FORMAT + ':' + fmt             # <<<<<<<<<<<<<<
 *         self.FORMAT = tmp
 * 
 */
  __pyx_t_1 = PyNumber_Add(__pyx_v_self->FORMAT, __pyx_kp_s__25); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __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 = 482; __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":483
 *     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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_tmp)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __pyx_v_tmp;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->FORMAT);
  __Pyx_DECREF(__pyx_v_self->FORMAT);
  __pyx_v_self->FORMAT = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_filter", 0);

  /* "cyvcf/parser.pyx":486
 * 
 *     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 = (__Pyx_PyBytes_Equals(__pyx_v_self->FILTER, __pyx_n_b_PASS, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

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

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

    /* "cyvcf/parser.pyx":490
 *         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":491
 *             tmp = self.FILTER + ';'
 *             self.FILTER = tmp
 *         tmp = self.FILTER + flt             # <<<<<<<<<<<<<<
 *         self.FILTER = tmp
 * 
 */
  __pyx_t_4 = PyNumber_Add(__pyx_v_self->FILTER, __pyx_v_flt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":492
 *             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;

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

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __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;
}

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

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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] = ((PyObject *)Py_True);
    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 = 494; __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 = 494; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":499
 *     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(__pyx_v_self->samples == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (unlikely(__pyx_v_self->_sample_indexes == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_sample_indexes, __pyx_v_name); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->samples, __pyx_t_1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __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;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->CHROM);
  __pyx_r = __pyx_v_self->CHROM;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = __Pyx_PyInt_From_int(__pyx_v_self->POS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->ID);
  __pyx_r = __pyx_v_self->ID;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->REF);
  __pyx_r = __pyx_v_self->REF;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->ALT);
  __pyx_r = __pyx_v_self->ALT;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->INFO);
  __pyx_r = __pyx_v_self->INFO;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->FORMAT);
  __pyx_r = __pyx_v_self->FORMAT;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = __Pyx_PyInt_From_int(__pyx_v_self->start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = __Pyx_PyInt_From_int(__pyx_v_self->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->alleles);
  __pyx_r = __pyx_v_self->alleles;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->samples);
  __pyx_r = __pyx_v_self->samples;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_bases);
  __pyx_r = __pyx_v_self->gt_bases;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_types);
  __pyx_r = __pyx_v_self->gt_types;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_phases);
  __pyx_r = __pyx_v_self->gt_phases;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_depths);
  __pyx_r = __pyx_v_self->gt_depths;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_ref_depths);
  __pyx_r = __pyx_v_self->gt_ref_depths;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_alt_depths);
  __pyx_r = __pyx_v_self->gt_alt_depths;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->gt_quals);
  __pyx_r = __pyx_v_self->gt_quals;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_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_15gt_copy_numbers___get__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers___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->gt_copy_numbers);
  __pyx_r = __pyx_v_self->gt_copy_numbers;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = __Pyx_PyInt_From_int(__pyx_v_self->num_hom_ref); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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 = __Pyx_PyInt_From_int(__pyx_v_self->num_het); 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;

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":616
 *         """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 = __Pyx_PyInt_From_int(__pyx_v_self->num_hom_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":631
 *     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 = __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 = 631; __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 = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(((double)__pyx_t_2) == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    PyGILState_Release(__pyx_gilstate_save);
    #endif
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __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 = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":640
 *         """
 *         # 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 = __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 = 640; __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 = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 1) != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":641
 *         # 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;
  }

  /* "cyvcf/parser.pyx":642
 *         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":643
 *             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 = __Pyx_PyInt_From_int(__pyx_v_self->num_het); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __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":644
 *         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 = __Pyx_PyInt_From_int(__pyx_v_self->num_hom_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __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":645
 *         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":646
 *         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) != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":647
 *         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_INCREF(__pyx_float_0_0);
    __pyx_r = __pyx_float_0_0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":649
 *             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 = 649; __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 = 649; __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 = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v_num_chroms == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      #ifdef WITH_THREAD
      PyGILState_Release(__pyx_gilstate_save);
      #endif
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __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 = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  double __pyx_t_4;
  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("nucl_diversity", 0);

  /* "cyvcf/parser.pyx":664
 *         """
 *         # skip if more than one alternate allele. assumes bi-allelic
 *         if len(self.ALT) > 1:             # <<<<<<<<<<<<<<
 *             return None
 *         p = self.aaf
 */
  __pyx_t_1 = __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 = 664; __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 = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 1) != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":665
 *         # 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;
  }

  /* "cyvcf/parser.pyx":666
 *         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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aaf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":667
 *             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 = PyNumber_Subtract(__pyx_float_1_0, __pyx_v_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_q = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":668
 *         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":669
 *         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_4 = (__pyx_v_num_chroms - 1.0);
  if (unlikely(__pyx_t_4 == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    PyGILState_Release(__pyx_gilstate_save);
    #endif
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_num_chroms / __pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Multiply(__pyx_float_2_0, __pyx_v_p); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_v_q); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __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_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __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;
}

/* "cyvcf/parser.pyx":671
 *         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]
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":673
 *     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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_self->samples == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __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 = 673; __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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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 = 673; __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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":671
 *         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]
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":675
 *         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]
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":677
 *     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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_self->samples == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __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 = 677; __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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __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 = 677; __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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":675
 *         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]
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":679
 *         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]
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":681
 *     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 = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_self->samples == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __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 = 681; __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 = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __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 = 681; __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 = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":679
 *         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]
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":683
 *         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]
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_unknowns", 0);

  /* "cyvcf/parser.pyx":685
 *     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 = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_self->samples == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __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 = 685; __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 = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __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;
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":683
 *         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]
 */

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_snp", 0);

  /* "cyvcf/parser.pyx":690
 *     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 = __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 = 690; __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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 1) != 0);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":691
 *         """ 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(__pyx_v_self->ALT == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __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 = 691; __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 = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_alt, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":692
 *         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_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_A, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_C, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = __pyx_t_5;
    } else {
      __pyx_t_6 = __pyx_t_3;
    }
    if (__pyx_t_6) {
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_G, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __pyx_t_3;
    } else {
      __pyx_t_5 = __pyx_t_6;
    }
    if (__pyx_t_5) {
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_T, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __pyx_t_6;
    } else {
      __pyx_t_3 = __pyx_t_5;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (__pyx_t_5) {

      /* "cyvcf/parser.pyx":693
 *         for alt in self.ALT:
 *             if alt not in ['A', 'C', 'G', 'T']:
 *                 return False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":694
 *             if alt not in ['A', 'C', 'G', 'T']:
 *                 return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":699
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); 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_v_is_sv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":701
 *         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 = __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 = 701; __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 = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 1) != 0);
  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 = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((!__pyx_t_4) != 0);
    __pyx_t_4 = __pyx_t_5;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":702
 * 
 *         if len(self.REF) > 1 and not is_sv: return True
 *         for alt in self.ALT:             # <<<<<<<<<<<<<<
 *             if alt is None:
 *                 return True
 */
  if (unlikely(__pyx_v_self->ALT == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __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 = 702; __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 = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_alt, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cyvcf/parser.pyx":703
 *         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);
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":704
 *         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_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "cyvcf/parser.pyx":705
 *             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 = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __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 = 705; __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 = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = ((__pyx_t_7 != __pyx_t_8) != 0);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":707
 *             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_3 = __Pyx_PyObject_IsTrue(__pyx_v_is_sv); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = ((!__pyx_t_3) != 0);
      if (__pyx_t_4) {

        /* "cyvcf/parser.pyx":709
 *                 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_INCREF(Py_True);
        __pyx_r = Py_True;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":712
 *                 else:
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	SVTYPE=DEL;
 *                     return False             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":713
 *                     # 1	2827693	.	CCCCTCGCA	C	.	PASS	SVTYPE=DEL;
 *                     return False
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sv", 0);

  /* "cyvcf/parser.pyx":718
 *     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(__pyx_v_self->INFO == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_SVTYPE, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __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;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":719
 *         """ 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_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":720
 *         if self.INFO.get('SVTYPE') is None:
 *             return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":723
 * 
 *     @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
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":726
 *         """ 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 = __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 = 726; __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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 1) != 0);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

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

    /* "cyvcf/parser.pyx":730
 *         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(__pyx_v_self->ALT == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ALT, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __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":731
 *             # 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(__pyx_v_self->REF, __pyx_n_b_A, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_v_alt_allele, __pyx_n_b_G, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (!__pyx_t_5) {

      /* "cyvcf/parser.pyx":732
 *             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(__pyx_v_self->REF, __pyx_n_b_G, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_3) {
        __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_v_alt_allele, __pyx_n_b_A, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = __pyx_t_4;
      } else {
        __pyx_t_6 = __pyx_t_3;
      }
      if (!__pyx_t_6) {

        /* "cyvcf/parser.pyx":733
 *             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(__pyx_v_self->REF, __pyx_n_b_C, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_3) {
          __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_v_alt_allele, __pyx_n_b_T, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_7 = __pyx_t_4;
        } else {
          __pyx_t_7 = __pyx_t_3;
        }
        if (!__pyx_t_7) {

          /* "cyvcf/parser.pyx":734
 *                 (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(__pyx_v_self->REF, __pyx_n_b_T, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_3) {
            __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_v_alt_allele, __pyx_n_b_C, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __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":735
 *                 (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_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":736
 *                 (self.REF == b'T' and alt_allele == b'C')):
 *                 return True
 *             else: return False             # <<<<<<<<<<<<<<
 *         else: return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":737
 *                 return True
 *             else: return False
 *         else: return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":723
 * 
 *     @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
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":740
 * 
 *     @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
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  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("is_deletion", 0);

  /* "cyvcf/parser.pyx":743
 *         """ 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 = __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 = 743; __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 = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 1) != 0);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":745
 *         if len(self.ALT) > 1: return False
 * 
 *         if self.is_indel:             # <<<<<<<<<<<<<<
 *             # just one alt allele
 *             alt_allele = self.ALT[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __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 = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":747
 *         if self.is_indel:
 *             # just one alt allele
 *             alt_allele = self.ALT[0]             # <<<<<<<<<<<<<<
 *             if alt_allele is None:
 *                 return True
 */
    if (unlikely(__pyx_v_self->ALT == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ALT, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __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":748
 *             # 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);
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":749
 *             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_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }

    /* "cyvcf/parser.pyx":750
 *             if alt_allele is None:
 *                 return True
 *             if len(self.REF) > len(alt_allele):             # <<<<<<<<<<<<<<
 *                 return True
 *             else: return False
 */
    __pyx_t_1 = __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 = 750; __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 = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = PyObject_Length(__pyx_v_alt_allele); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = ((__pyx_t_2 > __pyx_t_5) != 0);
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":751
 *                 return True
 *             if len(self.REF) > len(alt_allele):
 *                 return True             # <<<<<<<<<<<<<<
 *             else: return False
 *         else: return False
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":752
 *             if len(self.REF) > len(alt_allele):
 *                 return True
 *             else: return False             # <<<<<<<<<<<<<<
 *         else: return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":753
 *                 return True
 *             else: return False
 *         else: return False             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":740
 * 
 *     @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
 */

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":761
 *         TO DO: support SVs
 *         """
 *         if self.is_snp:             # <<<<<<<<<<<<<<
 *             return "snp"
 *         elif self.is_indel:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_snp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __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 = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

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

  /* "cyvcf/parser.pyx":763
 *         if self.is_snp:
 *             return "snp"
 *         elif self.is_indel:             # <<<<<<<<<<<<<<
 *             return "indel"
 *         elif self.is_sv:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __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 = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

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

  /* "cyvcf/parser.pyx":765
 *         elif self.is_indel:
 *             return "indel"
 *         elif self.is_sv:             # <<<<<<<<<<<<<<
 *             return "sv"
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); 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 "indel"
 *         elif self.is_sv:
 *             return "sv"             # <<<<<<<<<<<<<<
 *         else:
 *             return "unknown"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_sv);
    __pyx_r = __pyx_n_s_sv;
    goto __pyx_L0;
  }
  /*else*/ {

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

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":794
 *         of an IMPRECISE flag in the INFO field."
 *         """
 *         if self.is_snp:             # <<<<<<<<<<<<<<
 *             if self.is_transition:
 *                 return "ts"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_snp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __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 = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":795
 *         """
 *         if self.is_snp:
 *             if self.is_transition:             # <<<<<<<<<<<<<<
 *                 return "ts"
 *             elif len(self.ALT) == 1:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_transition); 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_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 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;
    if (__pyx_t_2) {

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

    /* "cyvcf/parser.pyx":797
 *             if self.is_transition:
 *                 return "ts"
 *             elif len(self.ALT) == 1:             # <<<<<<<<<<<<<<
 *                 return "tv"
 *             else: # multiple ALT alleles.  unclear
 */
    __pyx_t_1 = __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 = 797; __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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = ((__pyx_t_3 == 1) != 0);
    if (__pyx_t_2) {

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

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

  /* "cyvcf/parser.pyx":801
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"
 *         elif self.is_indel:             # <<<<<<<<<<<<<<
 *             if self.is_deletion:
 *                 return "del"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __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 = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":802
 *                 return "unknown"
 *         elif self.is_indel:
 *             if self.is_deletion:             # <<<<<<<<<<<<<<
 *                 return "del"
 *             elif len(self.ALT) == 1:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_deletion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __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 = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

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

    /* "cyvcf/parser.pyx":804
 *             if self.is_deletion:
 *                 return "del"
 *             elif len(self.ALT) == 1:             # <<<<<<<<<<<<<<
 *                 return "ins"
 *             else: # multiple ALT alleles.  unclear
 */
    __pyx_t_1 = __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 = 804; __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 = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = ((__pyx_t_3 == 1) != 0);
    if (__pyx_t_2) {

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

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

  /* "cyvcf/parser.pyx":808
 *             else: # multiple ALT alleles.  unclear
 *                 return "unknown"
 *         elif self.is_sv:             # <<<<<<<<<<<<<<
 *             if self.INFO['SVTYPE'] == "BND":
 *                 return "complex"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __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 = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

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

      /* "cyvcf/parser.pyx":810
 *         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(__pyx_n_s_complex);
      __pyx_r = __pyx_n_s_complex;
      goto __pyx_L0;
    }

    /* "cyvcf/parser.pyx":811
 *             if self.INFO['SVTYPE'] == "BND":
 *                 return "complex"
 *             elif self.is_sv_precise:             # <<<<<<<<<<<<<<
 *                 return self.INFO['SVTYPE']
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv_precise); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

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

      /* "cyvcf/parser.pyx":815
 *             else:
 *                 # first remove both "<" and ">" from ALT
 *                 return self.ALT[0].strip('<>')             # <<<<<<<<<<<<<<
 *         else:
 *             return "unknown"
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(__pyx_v_self->ALT == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ALT, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {

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

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":822
 *     def sv_end(self):
 *         """ Return the end position for the SV """
 *         if self.is_sv:             # <<<<<<<<<<<<<<
 *             return self.INFO['END']
 *         return None
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __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 = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

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

  /* "cyvcf/parser.pyx":824
 *         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;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":831
 *             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(__pyx_v_self->INFO == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_IMPRECISE, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __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 != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __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 = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((!__pyx_t_3) != 0);
    __pyx_t_3 = __pyx_t_4;
  } else {
    __pyx_t_3 = (__pyx_t_2 != 0);
  }
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":832
 *         """
 *         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_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":833
 *         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(__pyx_v_self->INFO == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_IMPRECISE, Py_None); 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_t_3 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); 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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __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":834
 *             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_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":835
 *         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(__pyx_v_self->INFO == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_IMPRECISE, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __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 = 835; __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":836
 *             return False
 *         elif self.INFO.get('IMPRECISE') is None and self.is_sv:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":841
 *     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 = __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 = 841; __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 = 841; __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(__pyx_v_self->ALT == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ALT, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __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 = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":858
 *     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.
 */

/* 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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};
    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 = 858; __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 = 859; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "cyvcf/parser.pyx":859
 * 
 *     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 = 859; __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 = 858; __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);

  /* "cyvcf/parser.pyx":858
 *     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.
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":866
 *             can be forced with ``compressed=True``
 *         """
 *         super(VCFReader, self).__init__()             # <<<<<<<<<<<<<<
 * 
 *         if not (fsock or filename):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VCFReader); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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 = 866; __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 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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":868
 *         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 = 868; __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 = 868; __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) != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":869
 * 
 *         if not (fsock or filename):
 *             raise Exception('You must provide at least fsock or filename')             # <<<<<<<<<<<<<<
 * 
 *         if filename:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __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 = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":871
 *             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 = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":872
 * 
 *         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":873
 *         if filename:
 *             self.filename = filename
 *             if fsock is None:             # <<<<<<<<<<<<<<
 *                 self.reader = file(filename)
 * 
 */
    __pyx_t_3 = (__pyx_v_fsock == Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (__pyx_t_5) {

      /* "cyvcf/parser.pyx":874
 *             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 = 874; __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 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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":876
 *                 self.reader = file(filename)
 * 
 *         if fsock:             # <<<<<<<<<<<<<<
 *             self.reader = fsock
 *             if filename is None:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_fsock); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":877
 * 
 *         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":878
 *         if fsock:
 *             self.reader = fsock
 *             if filename is None:             # <<<<<<<<<<<<<<
 *                 if hasattr(fsock, 'name'):
 *                     filename = fsock.name
 */
    __pyx_t_5 = (__pyx_v_filename == Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":879
 *             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, __pyx_n_s_name); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = (__pyx_t_3 != 0);
      if (__pyx_t_5) {

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

    /* "cyvcf/parser.pyx":881
 *                 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":883
 *             self.filename = filename
 * 
 *         if compressed or (filename and filename.endswith('.gz')):             # <<<<<<<<<<<<<<
 *             self.reader = gzip.GzipFile(fileobj=self.reader)
 * 
 */
  __pyx_t_5 = __pyx_v_compressed;
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __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 = 883; __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;
    }
    __pyx_t_3 = __pyx_t_6;
  } else {
    __pyx_t_3 = __pyx_t_5;
  }
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":884
 * 
 *         if compressed or (filename and filename.endswith('.gz')):
 *             self.reader = gzip.GzipFile(fileobj=self.reader)             # <<<<<<<<<<<<<<
 * 
 *         #: metadata fields from header
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_gzip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __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 = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fileobj, __pyx_v_self->reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_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":887
 * 
 *         #: 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 = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":889
 *         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 = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->infos);
  __Pyx_DECREF(__pyx_v_self->infos);
  __pyx_v_self->infos = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":891
 *         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 = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->filters);
  __Pyx_DECREF(__pyx_v_self->filters);
  __pyx_v_self->filters = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":893
 *         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 = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(__pyx_v_self->formats);
  __pyx_v_self->formats = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":894
 *         #: 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 = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(__pyx_v_self->samples);
  __pyx_v_self->samples = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":895
 *         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 = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
  __Pyx_DECREF(__pyx_v_self->_sample_indexes);
  __pyx_v_self->_sample_indexes = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":896
 *         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 = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->_header_lines);
  __Pyx_DECREF(__pyx_v_self->_header_lines);
  __pyx_v_self->_header_lines = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":897
 *         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(__pyx_v_self->_col_defn_line);
  __pyx_v_self->_col_defn_line = ((PyObject*)Py_None);

  /* "cyvcf/parser.pyx":898
 *         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":899
 *         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":900
 *         self._tabix = None
 *         self._prepend_chr = prepend_chr
 *         self._parse_metainfo()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_metainfo); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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;

  /* "cyvcf/parser.pyx":858
 *     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.
 */

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":903
 * 
 *     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;

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

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":906
 * 
 *     def seek(self, offset):
 *         self.reader.seek(offset)             # <<<<<<<<<<<<<<
 * 
 *     def tell(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __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 = 906; __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 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":909
 * 
 *     def tell(self):
 *         return self.reader.tell()             # <<<<<<<<<<<<<<
 * 
 *     property filename:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_tell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __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;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->samples);
  __pyx_r = __pyx_v_self->samples;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->formats);
  __pyx_r = __pyx_v_self->formats;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->infos);
  __pyx_r = __pyx_v_self->infos;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->filters);
  __pyx_r = __pyx_v_self->filters;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":938
 *         """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 = __pyx_v_self->_header_lines;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __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;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":950
 *         #     setattr(self, attr, {})
 * 
 *         parser = _vcf_metadata_parser()             # <<<<<<<<<<<<<<
 * 
 *         line = self.reader.next()
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_vcf_metadata_parser); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_parser = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":952
 *         parser = _vcf_metadata_parser()
 * 
 *         line = self.reader.next()             # <<<<<<<<<<<<<<
 *         while line.startswith('##'):
 *             self._header_lines.append(line)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); 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);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_line = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":953
 * 
 *         line = self.reader.next()
 *         while line.startswith('##'):             # <<<<<<<<<<<<<<
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')
 */
  while (1) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__34, NULL); 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_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 = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_3) break;

    /* "cyvcf/parser.pyx":954
 *         line = self.reader.next()
 *         while line.startswith('##'):
 *             self._header_lines.append(line)             # <<<<<<<<<<<<<<
 *             line = line.rstrip('\n')
 * 
 */
    if (unlikely(__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 = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_header_lines, __pyx_v_line); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":955
 *         while line.startswith('##'):
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')             # <<<<<<<<<<<<<<
 * 
 *             if line.startswith('##INFO'):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":957
 *             line = line.rstrip('\n')
 * 
 *             if line.startswith('##INFO'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_info(line)
 *                 self.infos[key] = val
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __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 = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":958
 * 
 *             if line.startswith('##INFO'):
 *                 key, val = parser.read_info(line)             # <<<<<<<<<<<<<<
 *                 self.infos[key] = val
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __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 = 958; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__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 = 958; __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 = 958; __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 = 958; __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 = 958; __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 = 958; __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 = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

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

    /* "cyvcf/parser.pyx":961
 *                 self.infos[key] = val
 * 
 *             elif line.startswith('##FILTER'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_filter(line)
 *                 self.filters[key] = val
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __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 = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":962
 * 
 *             elif line.startswith('##FILTER'):
 *                 key, val = parser.read_filter(line)             # <<<<<<<<<<<<<<
 *                 self.filters[key] = val
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __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 = 962; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __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_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 = 962; __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 = 962; __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 = 962; __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 = 962; __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 = 962; __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 = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

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

    /* "cyvcf/parser.pyx":965
 *                 self.filters[key] = val
 * 
 *             elif line.startswith('##FORMAT'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_format(line)
 *                 self.formats[key] = val
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __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 = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "cyvcf/parser.pyx":966
 * 
 *             elif line.startswith('##FORMAT'):
 *                 key, val = parser.read_format(line)             # <<<<<<<<<<<<<<
 *                 self.formats[key] = val
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __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 = 966; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__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 = 966; __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 = 966; __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 = 966; __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 = 966; __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 = 966; __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 = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

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

      /* "cyvcf/parser.pyx":970
 * 
 *             else:
 *                 key, val = parser.read_meta(line.strip())             # <<<<<<<<<<<<<<
 *                 self.metadata[key] = val
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_meta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_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 = 970; __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 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__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 = 970; __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 = 970; __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 = 970; __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 = 970; __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 = 970; __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 = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L13_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
      __pyx_t_5 = 0;

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

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

  /* "cyvcf/parser.pyx":975
 *             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 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __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 = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":976
 * 
 *         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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_line)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __pyx_v_line;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_col_defn_line);
    __Pyx_DECREF(__pyx_v_self->_col_defn_line);
    __pyx_v_self->_col_defn_line = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":977
 *         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(__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 = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_header_lines, __pyx_v_line); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":978
 *             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 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __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":979
 *             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_PyObject_GetSlice(__pyx_v_fields, 9, 0, NULL, NULL, &__pyx_slice__42, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __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 %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->samples);
    __Pyx_DECREF(__pyx_v_self->samples);
    __pyx_v_self->samples = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":980
 *             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 = __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 = 980; __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 = 980; __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":981
 *             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 = 981; __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 = __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 = 981; __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 = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__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 = 981; __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 = 981; __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_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __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_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 = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
    __Pyx_DECREF(__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":983
 *             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_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __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:;

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

  /* function exit code */
  __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;
}

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

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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__21);
    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 = 986; __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 = 986; __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 = 986; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":988
 *     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 = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":989
 *         '''``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 = 989; __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 = 989; __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 = 989; __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 = 989; __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 = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":988
 *     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 = 988; __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 = 988; __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 = 988; __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 = __Pyx_PyObject_Call(__pyx_v_func, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__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_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __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;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  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":997
 * 
 *         '''
 *         if info_str == '.':             # <<<<<<<<<<<<<<
 *             return {}
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_info_str, __pyx_kp_s__21, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

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

  /* "cyvcf/parser.pyx":1000
 *             return {}
 * 
 *         entries = info_str.split(';')             # <<<<<<<<<<<<<<
 *         retdict = {}
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_info_str, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_entries = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":1001
 * 
 *         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 = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_retdict = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

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

  /* "cyvcf/parser.pyx":1004
 * 
 *         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 = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "cyvcf/parser.pyx":1007
 *         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":1008
 *         # 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, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":1010
 *             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, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_ID, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":1011
 *             # 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":1012
 *             ID = entry[0]
 *             try:
 *                 entry_type = self.infos[ID].type             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 try:
 */
        if (unlikely(__pyx_v_self->infos == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        }
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->infos, __pyx_v_ID); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L6_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2); __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":1013
 *             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_2, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_12);

        /* "cyvcf/parser.pyx":1014
 *                 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":1015
 *             except KeyError:
 *                 try:
 *                     entry_type = RESERVED_INFO[ID]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     if entry[1:]:
 */
            __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_RESERVED_INFO); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_17 = PyObject_GetItem(__pyx_t_16, __pyx_v_ID); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L16_error;};
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_17); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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":1016
 *                 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 = 1016; __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":1017
 *                     entry_type = RESERVED_INFO[ID]
 *                 except KeyError:
 *                     if entry[1:]:             # <<<<<<<<<<<<<<
 *                         entry_type = 'String'
 *                     else:
 */
            __pyx_t_19 = __Pyx_PyObject_GetSlice(__pyx_v_entry, 1, 0, NULL, NULL, &__pyx_slice__47, 1, 0, 1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            if (__pyx_t_1) {

              /* "cyvcf/parser.pyx":1018
 *                 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":1020
 *                         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;
          }
          goto __pyx_L18_except_error;
          __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_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L7_exception_handled;
      }
      goto __pyx_L8_except_error;
      __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":1022
 *                         entry_type = 'Flag'
 * 
 *             if entry_type == b'Integer':             # <<<<<<<<<<<<<<
 *                 vals = entry[1].split(',')
 *                 try:
 */
    __pyx_t_12 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_12, __pyx_n_b_Integer, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":1023
 * 
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = self._map(int, vals)
 */
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "cyvcf/parser.pyx":1024
 *             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":1025
 *                 vals = entry[1].split(',')
 *                 try:
 *                     val = self._map(int, vals)             # <<<<<<<<<<<<<<
 *                 except ValueError:
 *                     val = self._map(float, vals)
 */
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
          __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
          __Pyx_INCREF(__pyx_v_vals);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_vals);
          __Pyx_GIVEREF(__pyx_v_vals);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
          __pyx_t_2 = 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_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cyvcf/parser.pyx":1026
 *                 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_2, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_12);

          /* "cyvcf/parser.pyx":1027
 *                     val = self._map(int, vals)
 *                 except ValueError:
 *                     val = self._map(float, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')
 */
          __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __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 = 1027; __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 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_17);
          __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L29_exception_handled;
        }
        goto __pyx_L30_except_error;
        __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":1028
 *                 except ValueError:
 *                     val = self._map(float, vals)
 *             elif entry_type == b'Float':             # <<<<<<<<<<<<<<
 *                 vals = entry[1].split(',')
 *                 val = self._map(float, vals)
 */
    __pyx_t_12 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_12, __pyx_n_b_Float, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":1029
 *                     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, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "cyvcf/parser.pyx":1030
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')
 *                 val = self._map(float, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Flag':
 *                 val = True
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __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 = 1030; __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_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L27;
    }

    /* "cyvcf/parser.pyx":1031
 *                 vals = entry[1].split(',')
 *                 val = self._map(float, vals)
 *             elif entry_type == b'Flag':             # <<<<<<<<<<<<<<
 *                 val = True
 *             elif entry_type == b'String':
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_Flag, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":1032
 *                 val = self._map(float, vals)
 *             elif entry_type == b'Flag':
 *                 val = True             # <<<<<<<<<<<<<<
 *             elif entry_type == b'String':
 *                 try:
 */
      __Pyx_INCREF(Py_True);
      __Pyx_XDECREF_SET(__pyx_v_val, Py_True);
      goto __pyx_L27;
    }

    /* "cyvcf/parser.pyx":1033
 *             elif entry_type == b'Flag':
 *                 val = True
 *             elif entry_type == b'String':             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = entry[1]
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_String, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":1034
 *                 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":1035
 *             elif entry_type == b'String':
 *                 try:
 *                     val = entry[1]             # <<<<<<<<<<<<<<
 *                 except IndexError:
 *                     val = True
 */
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L38_error;};
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
          __pyx_t_2 = 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_2); __pyx_t_2 = 0;

        /* "cyvcf/parser.pyx":1036
 *                 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_2, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L40_except_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_12);

          /* "cyvcf/parser.pyx":1037
 *                     val = entry[1]
 *                 except IndexError:
 *                     val = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __Pyx_INCREF(Py_True);
          __Pyx_XDECREF_SET(__pyx_v_val, Py_True);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L39_exception_handled;
        }
        goto __pyx_L40_except_error;
        __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":1040
 * 
 * 
 *             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":1041
 * 
 *             try:
 *                 if self.infos[ID].num == 1 and entry_type != b'String':             # <<<<<<<<<<<<<<
 *                     val = val[0]
 *             except KeyError:
 */
        if (unlikely(__pyx_v_self->infos == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        }
        __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_self->infos, __pyx_v_ID); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L48_error;};
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __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 = 1041; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_1) {
          __pyx_t_12 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_20 = (__Pyx_PyBytes_Equals(__pyx_t_12, __pyx_n_b_String, Py_NE)); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L48_error;}
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_21 = __pyx_t_20;
        } else {
          __pyx_t_21 = __pyx_t_1;
        }
        if (__pyx_t_21) {

          /* "cyvcf/parser.pyx":1042
 *             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 = 1042; __pyx_clineno = __LINE__; goto __pyx_L48_error;} }
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L48_error;};
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_12);
          __pyx_t_12 = 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_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "cyvcf/parser.pyx":1043
 *                 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;
      }
      goto __pyx_L50_except_error;
      __pyx_L50_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_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":1046
 *                 pass
 * 
 *             retdict[ID] = val             # <<<<<<<<<<<<<<
 * 
 *         return retdict
 */
    if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (unlikely(PyDict_SetItem(__pyx_v_retdict, __pyx_v_ID, __pyx_v_val) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":1048
 *             retdict[ID] = val
 * 
 *         return retdict             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_retdict);
  __pyx_r = __pyx_v_retdict;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __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;
}

/* "cyvcf/parser.pyx":1051
 * 
 * 
 *     def _parse_samples(self, list samples, char *samp_fmt_s):             # <<<<<<<<<<<<<<
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 1051; __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 = 1051; __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 = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_samp_fmt_s) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __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 = 1051; __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 = 1051; __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);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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_gt_copy_numbers = 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_v_copy_number = 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_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_samples", 0);

  /* "cyvcf/parser.pyx":1054
 *         '''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 = __Pyx_PyBytes_FromString(__pyx_v_samp_fmt_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __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 %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_samp_fmt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1055
 *         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 = 1055; __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":1056
 *         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 = 1056; __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":1058
 *         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":1059
 * 
 *         cdef int i = 0
 *         cdef int n = len(samp_fmt)             # <<<<<<<<<<<<<<
 *         cdef char *fmt
 *         # for fmt in samp_fmt:
 */
  if (unlikely(__pyx_v_samp_fmt == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(__pyx_v_samp_fmt); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "cyvcf/parser.pyx":1062
 *         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":1063
 *         # for fmt in samp_fmt:
 *         for i in xrange(n):
 *             fmt = samp_fmt[i]             # <<<<<<<<<<<<<<
 *             try:
 *                 entry_type = self.formats[fmt].type
 */
    if (unlikely(__pyx_v_samp_fmt == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_samp_fmt, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __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":1064
 *         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":1065
 *             fmt = samp_fmt[i]
 *             try:
 *                 entry_type = self.formats[fmt].type             # <<<<<<<<<<<<<<
 *                 entry_num = self.formats[fmt].num
 *             except KeyError:
 */
        if (unlikely(__pyx_v_self->formats == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        }
        __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_fmt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->formats, __pyx_t_1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_entry_type, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cyvcf/parser.pyx":1066
 *             try:
 *                 entry_type = self.formats[fmt].type
 *                 entry_num = self.formats[fmt].num             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 entry_num = None
 */
        if (unlikely(__pyx_v_self->formats == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        }
        __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_fmt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->formats, __pyx_t_1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_num); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__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":1067
 *                 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 = 1067; __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":1068
 *                 entry_num = self.formats[fmt].num
 *             except KeyError:
 *                 entry_num = None             # <<<<<<<<<<<<<<
 *                 try:
 *                     entry_type = RESERVED_FORMAT[fmt]
 */
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF_SET(__pyx_v_entry_num, Py_None);

        /* "cyvcf/parser.pyx":1069
 *             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":1070
 *                 entry_num = None
 *                 try:
 *                     entry_type = RESERVED_FORMAT[fmt]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     entry_type = 'String'
 */
            __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_RESERVED_FORMAT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_16 = __Pyx_PyBytes_FromString(__pyx_v_fmt); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_17 = PyObject_GetItem(__pyx_t_15, __pyx_t_16); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L15_error;};
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF_SET(__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":1071
 *                 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 = 1071; __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":1072
 *                     entry_type = RESERVED_FORMAT[fmt]
 *                 except KeyError:
 *                     entry_type = 'String'             # <<<<<<<<<<<<<<
 *             samp_fmt_types.append(entry_type)
 *             samp_fmt_nums.append(entry_num)
 */
            __Pyx_INCREF(__pyx_n_s_String);
            __Pyx_XDECREF_SET(__pyx_v_entry_type, __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;
          }
          goto __pyx_L17_except_error;
          __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;
      }
      goto __pyx_L7_except_error;
      __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":1073
 *                 except KeyError:
 *                     entry_type = 'String'
 *             samp_fmt_types.append(entry_type)             # <<<<<<<<<<<<<<
 *             samp_fmt_nums.append(entry_num)
 * 
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_samp_fmt_types, __pyx_v_entry_type); 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
 *                     entry_type = 'String'
 *             samp_fmt_types.append(entry_type)
 *             samp_fmt_nums.append(entry_num)             # <<<<<<<<<<<<<<
 * 
 *         cdef int num_hom_ref = 0
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_samp_fmt_nums, __pyx_v_entry_num); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":1076
 *             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":1077
 * 
 *         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":1078
 *         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":1079
 *         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":1080
 *         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":1081
 *         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 = 1081; __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":1082
 *         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 = 1082; __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":1083
 *         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 = 1083; __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":1084
 *         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 = 1084; __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":1085
 *         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 = 1085; __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":1086
 *         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 = 1086; __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":1087
 *         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.
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, etc.
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __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":1088
 *         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.             # <<<<<<<<<<<<<<
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, etc.
 *         i = 0
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __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":1089
 *         cdef list gt_alt_depths  = []# 7, 5, 0, etc.
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, 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 = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_copy_numbers = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1090
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, etc.
 *         i = 0             # <<<<<<<<<<<<<<
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":1091
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, 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":1092
 *         i = 0
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]             # <<<<<<<<<<<<<<
 *             sample = samples[i]
 * 
 */
    if (unlikely(__pyx_v_self->samples == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_self->samples, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":1093
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]
 *             sample = samples[i]             # <<<<<<<<<<<<<<
 * 
 *             sampdict = self._parse_sample(sample, samp_fmt, \
 */
    if (unlikely(__pyx_v_samples == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_samples, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":1095
 *             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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_sample); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);

    /* "cyvcf/parser.pyx":1096
 * 
 *             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 = 1095; __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(__pyx_v_samp_fmt);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_samp_fmt);
    __Pyx_GIVEREF(__pyx_v_samp_fmt);
    __Pyx_INCREF(__pyx_v_samp_fmt_types);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_samp_fmt_types);
    __Pyx_GIVEREF(__pyx_v_samp_fmt_types);
    __Pyx_INCREF(__pyx_v_samp_fmt_nums);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_samp_fmt_nums);
    __Pyx_GIVEREF(__pyx_v_samp_fmt_nums);

    /* "cyvcf/parser.pyx":1095
 *             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_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_sampdict, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1097
 *             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 = 1097; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Call)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_call, ((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1098
 *                                           samp_fmt_types, samp_fmt_nums)
 *             call = _Call(self.curr_record, name, sampdict)
 *             samp_data.append(call)             # <<<<<<<<<<<<<<
 * 
 *             alleles = call.gt_bases
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_samp_data, ((PyObject *)__pyx_v_call)); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1100
 *             samp_data.append(call)
 * 
 *             alleles = call.gt_bases             # <<<<<<<<<<<<<<
 *             type = call.gt_type
 *             phased = call.phased
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_bases); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_alleles, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1101
 * 
 *             alleles = call.gt_bases
 *             type = call.gt_type             # <<<<<<<<<<<<<<
 *             phased = call.phased
 *             depth = call.gt_depth
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_type, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1102
 *             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":1103
 *             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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_depth); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_depth, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1104
 *             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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_ref_depth); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_ref_depth, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1105
 *             depth = call.gt_depth
 *             ref_depth = call.gt_ref_depth
 *             alt_depth = call.gt_alt_depth             # <<<<<<<<<<<<<<
 *             qual = call.gt_qual
 *             copy_number = call.gt_copy_number
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_alt_depth); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_alt_depth, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1106
 *             ref_depth = call.gt_ref_depth
 *             alt_depth = call.gt_alt_depth
 *             qual = call.gt_qual             # <<<<<<<<<<<<<<
 *             copy_number = call.gt_copy_number
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_qual, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1107
 *             alt_depth = call.gt_alt_depth
 *             qual = call.gt_qual
 *             copy_number = call.gt_copy_number             # <<<<<<<<<<<<<<
 * 
 *             # add to the "all-samples" lists of GT info
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_copy_number); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_copy_number, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1110
 * 
 *             # 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);
    __pyx_t_20 = (__pyx_t_19 != 0);
    if (__pyx_t_20) {

      /* "cyvcf/parser.pyx":1111
 *             # 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 = __Pyx_PyList_Append(__pyx_v_gt_alleles, __pyx_v_alleles); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1112
 *             if alleles is not None:
 *                 gt_alleles.append(alleles)
 *                 gt_types.append(type)             # <<<<<<<<<<<<<<
 *             else:
 *                 gt_alleles.append('./.')
 */
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_types, __pyx_v_type); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L27;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":1114
 *                 gt_types.append(type)
 *             else:
 *                 gt_alleles.append('./.')             # <<<<<<<<<<<<<<
 *                 gt_types.append(2)
 * 
 */
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_alleles, __pyx_kp_s__27); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1115
 *             else:
 *                 gt_alleles.append('./.')
 *                 gt_types.append(2)             # <<<<<<<<<<<<<<
 * 
 *             gt_phases.append(phased)
 */
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_types, __pyx_int_2); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L27:;

    /* "cyvcf/parser.pyx":1117
 *                 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 = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_phases, __pyx_t_2); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":1118
 * 
 *             gt_phases.append(phased)
 *             gt_depths.append(depth)             # <<<<<<<<<<<<<<
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_depths, __pyx_v_depth); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1119
 *             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 = __Pyx_PyList_Append(__pyx_v_gt_ref_depths, __pyx_v_ref_depth); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1120
 *             gt_depths.append(depth)
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)             # <<<<<<<<<<<<<<
 *             gt_quals.append(qual)
 *             gt_copy_numbers.append(copy_number)
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_alt_depths, __pyx_v_alt_depth); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1121
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)
 *             gt_quals.append(qual)             # <<<<<<<<<<<<<<
 *             gt_copy_numbers.append(copy_number)
 * 
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_quals, __pyx_v_qual); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1122
 *             gt_alt_depths.append(alt_depth)
 *             gt_quals.append(qual)
 *             gt_copy_numbers.append(copy_number)             # <<<<<<<<<<<<<<
 * 
 *             # 0 / 00000000 hom ref
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_copy_numbers, __pyx_v_copy_number); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":1130
 * 
 *             # 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_GetModuleGlobalName(__pyx_n_s_HOM_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __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 = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_hom_ref = (__pyx_v_num_hom_ref + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1131
 *             # 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_GetModuleGlobalName(__pyx_n_s_HET); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __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 = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_het = (__pyx_v_num_het + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1132
 *             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_GetModuleGlobalName(__pyx_n_s_HOM_ALT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __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 = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_hom_alt = (__pyx_v_num_hom_alt + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1133
 *             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 = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_unknown = (__pyx_v_num_unknown + 1);
      goto __pyx_L28;
    }
    __pyx_L28:;
  }

  /* "cyvcf/parser.pyx":1135
 *             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":1137
 *         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_GetModuleGlobalName(__pyx_n_s_SampleInfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __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 = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_samples, __pyx_v_samp_data) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gt_bases, __pyx_v_gt_alleles) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1138
 * 
 *         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, __pyx_n_s_gt_types, __pyx_v_gt_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gt_phases, __pyx_v_gt_phases) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1139
 *         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,
 *                            gt_copy_numbers=gt_copy_numbers,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gt_depths, __pyx_v_gt_depths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gt_ref_depths, __pyx_v_gt_ref_depths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1140
 *                            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,             # <<<<<<<<<<<<<<
 *                            gt_copy_numbers=gt_copy_numbers,
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gt_alt_depths, __pyx_v_gt_alt_depths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gt_quals, __pyx_v_gt_quals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1141
 *                            gt_depths=gt_depths, gt_ref_depths=gt_ref_depths,
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 *                            gt_copy_numbers=gt_copy_numbers,             # <<<<<<<<<<<<<<
 *                            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, __pyx_n_s_gt_copy_numbers, __pyx_v_gt_copy_numbers) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1142
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 *                            gt_copy_numbers=gt_copy_numbers,
 *                            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 = __Pyx_PyInt_From_int(__pyx_v_num_hom_ref); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_hom_ref, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_num_het); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_het, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1143
 *                            gt_copy_numbers=gt_copy_numbers,
 *                            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 = __Pyx_PyInt_From_int(__pyx_v_num_hom_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_hom_alt, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_num_unknown); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_unknown, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1144
 *                            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 = __Pyx_PyInt_From_int(__pyx_v_num_called); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_called, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":1137
 *         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_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1051
 * 
 * 
 *     def _parse_samples(self, list samples, char *samp_fmt_s):             # <<<<<<<<<<<<<<
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 */

  /* function exit code */
  __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_gt_copy_numbers);
  __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_XDECREF(__pyx_v_copy_number);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1146
 *                            num_called=num_called)
 * 
 *     def _parse_sample(self, char *sample, list samp_fmt,             # <<<<<<<<<<<<<<
 *                             list samp_fmt_types, list samp_fmt_nums):
 * 
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1146; __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 = 1146; __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 = 1146; __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 = 1146; __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 = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_sample) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __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 = 1146; __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 = 1146; __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 = 1147; __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 = 1147; __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);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  double __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_sample", 0);

  /* "cyvcf/parser.pyx":1149
 *                             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 = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_samp_fmt == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __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 = 1149; __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 = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__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 = 1149; __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_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__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 = 1149; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_sampdict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1152
 * 
 *         # 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_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_izip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1153
 *         # 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 = __Pyx_PyBytes_FromString(__pyx_v_sample); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1152
 * 
 *         # 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_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_samp_fmt);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_samp_fmt);
  __Pyx_GIVEREF(__pyx_v_samp_fmt);
  __Pyx_INCREF(__pyx_v_samp_fmt_types);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_samp_fmt_types);
  __Pyx_GIVEREF(__pyx_v_samp_fmt_types);
  __Pyx_INCREF(__pyx_v_samp_fmt_nums);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_samp_fmt_nums);
  __Pyx_GIVEREF(__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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __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_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 = 1152; __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 (;;) {
    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 = 1152; __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 = 1152; __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 = 1152; __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 = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __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 = 1152; __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 = 1152; __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 = 1152; __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 = 1152; __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 = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_fmt, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_entry_type, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_entry_num, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":1156
 * 
 *             # short circuit the most common
 *             if vals == '.' or vals == './.' or vals == '.|.':             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = None
 *                 continue
 */
    __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_vals, __pyx_kp_s__21, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_11) {
      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_vals, __pyx_kp_s__27, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_12) {
        __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_vals, __pyx_kp_s__52, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_14 = __pyx_t_13;
      } else {
        __pyx_t_14 = __pyx_t_12;
      }
      __pyx_t_12 = __pyx_t_14;
    } else {
      __pyx_t_12 = __pyx_t_11;
    }
    if (__pyx_t_12) {

      /* "cyvcf/parser.pyx":1157
 *             # short circuit the most common
 *             if vals == '.' or vals == './.' or vals == '.|.':
 *                 sampdict[fmt] = None             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, Py_None) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1158
 *             if vals == '.' or vals == './.' or vals == '.|.':
 *                 sampdict[fmt] = None
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             # we don't need to split single entries
 */
      goto __pyx_L5_continue;
    }

    /* "cyvcf/parser.pyx":1161
 * 
 *             # 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 = 1161; __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 = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_12) {
      __pyx_t_11 = (__Pyx_PySequence_Contains(__pyx_kp_s__23, __pyx_v_vals, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_14 = __pyx_t_11;
    } else {
      __pyx_t_14 = __pyx_t_12;
    }
    if (__pyx_t_14) {

      /* "cyvcf/parser.pyx":1162
 *             # 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_14 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_14) {

        /* "cyvcf/parser.pyx":1163
 *             if entry_num == 1 or ',' not in vals:
 *                 if entry_type == 'Integer':
 *                     try:             # <<<<<<<<<<<<<<
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          /*try:*/ {

            /* "cyvcf/parser.pyx":1164
 *                 if entry_type == 'Integer':
 *                     try:
 *                         sampdict[fmt] = int(vals)             # <<<<<<<<<<<<<<
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)
 */
            __pyx_t_1 = PyNumber_Int(__pyx_v_vals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_GOTREF(__pyx_t_1);
            if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __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;
          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_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "cyvcf/parser.pyx":1165
 *                     try:
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:             # <<<<<<<<<<<<<<
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':
 */
          __pyx_t_18 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
          if (__pyx_t_18) {
            __Pyx_AddTraceback("cyvcf.parser.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GOTREF(__pyx_t_7);

            /* "cyvcf/parser.pyx":1166
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)             # <<<<<<<<<<<<<<
 *                 elif entry_type == 'Float':
 *                     sampdict[fmt] = float(vals)
 */
            __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_v_vals); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __pyx_t_6 = PyFloat_FromDouble(__pyx_t_19); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_6);
            if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L13_exception_handled;
          }
          goto __pyx_L14_except_error;
          __pyx_L14_except_error:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          goto __pyx_L1_error;
          __pyx_L13_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_L19_try_end:;
        }
        goto __pyx_L11;
      }

      /* "cyvcf/parser.pyx":1167
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':             # <<<<<<<<<<<<<<
 *                     sampdict[fmt] = float(vals)
 *                 else:
 */
      __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_14) {

        /* "cyvcf/parser.pyx":1168
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':
 *                     sampdict[fmt] = float(vals)             # <<<<<<<<<<<<<<
 *                 else:
 *                     sampdict[fmt] = vals
 */
        __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_v_vals); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = PyFloat_FromDouble(__pyx_t_19); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":1170
 *                     sampdict[fmt] = float(vals)
 *                 else:
 *                     sampdict[fmt] = vals             # <<<<<<<<<<<<<<
 * 
 *                 if entry_num != 1:
 */
        if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_v_vals) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L11:;

      /* "cyvcf/parser.pyx":1172
 *                     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 = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_14) {

        /* "cyvcf/parser.pyx":1173
 * 
 *                 if entry_num != 1:
 *                     sampdict[fmt] = (sampdict[fmt])             # <<<<<<<<<<<<<<
 * 
 *                 continue
 */
        __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_sampdict, __pyx_v_fmt); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L22;
      }
      __pyx_L22:;

      /* "cyvcf/parser.pyx":1175
 *                     sampdict[fmt] = (sampdict[fmt])
 * 
 *                 continue             # <<<<<<<<<<<<<<
 * 
 * 
 */
      goto __pyx_L5_continue;
    }

    /* "cyvcf/parser.pyx":1178
 * 
 * 
 *             vals = vals.split(',')             # <<<<<<<<<<<<<<
 * 
 *             if entry_type == 'Integer':
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_vals, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_vals, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":1180
 *             vals = vals.split(',')
 * 
 *             if entry_type == 'Integer':             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = self._map(int, vals)
 *             elif entry_type == 'Float' or entry_type == 'Numeric':
 */
    __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_14) {

      /* "cyvcf/parser.pyx":1181
 * 
 *             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_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __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 = 1181; __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_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L23;
    }

    /* "cyvcf/parser.pyx":1182
 *             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_14 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_14) {
      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Numeric, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = __pyx_t_12;
    } else {
      __pyx_t_11 = __pyx_t_14;
    }
    if (__pyx_t_11) {

      /* "cyvcf/parser.pyx":1183
 *                 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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __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 = 1183; __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_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L23;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":1185
 *                 sampdict[fmt] = self._map(float, vals)
 *             else:
 *                 sampdict[fmt] = vals             # <<<<<<<<<<<<<<
 * 
 *         return sampdict
 */
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_v_vals) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L23:;
    __pyx_L5_continue:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1187
 *                 sampdict[fmt] = vals
 * 
 *         return sampdict             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_sampdict);
  __pyx_r = __pyx_v_sampdict;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1146
 *                            num_called=num_called)
 * 
 *     def _parse_sample(self, char *sample, list samp_fmt,             # <<<<<<<<<<<<<<
 *                             list samp_fmt_types, list samp_fmt_nums):
 * 
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1190
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 * 
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":1195
 *         #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":1196
 *         cdef list row
 *         try:
 *             row = self.reader.next().rstrip().split('\t')             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             raise StopIteration
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_next); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __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 %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __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":1197
 *         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 = 1197; __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":1198
 *             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 = 1198; __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;
    }
    goto __pyx_L5_except_error;
    __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":1201
 * 
 *         #CHROM
 *         cdef bytes chrom = row[0]             # <<<<<<<<<<<<<<
 *         if self._prepend_chr:
 *             chrom = 'chr' + str(chrom)
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_row, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_chrom = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1202
 *         #CHROM
 *         cdef bytes chrom = row[0]
 *         if self._prepend_chr:             # <<<<<<<<<<<<<<
 *             chrom = 'chr' + str(chrom)
 *         # POS
 */
  __pyx_t_8 = (__pyx_v_self->_prepend_chr != 0);
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1203
 *         cdef bytes chrom = row[0]
 *         if self._prepend_chr:
 *             chrom = 'chr' + str(chrom)             # <<<<<<<<<<<<<<
 *         # POS
 *         cdef int pos = int(row[1])
 */
    __pyx_t_7 = PyTuple_New(1); 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);
    __Pyx_INCREF(__pyx_v_chrom);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom);
    __Pyx_GIVEREF(__pyx_v_chrom);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Add(__pyx_n_s_chr, __pyx_t_4); 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);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "cyvcf/parser.pyx":1205
 *             chrom = 'chr' + str(chrom)
 *         # POS
 *         cdef int pos = int(row[1])             # <<<<<<<<<<<<<<
 *         # ID
 *         cdef bytes id = row[2]
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_row, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); 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_4); __pyx_t_4 = 0;
  __pyx_v_pos = __pyx_t_6;

  /* "cyvcf/parser.pyx":1207
 *         cdef int pos = int(row[1])
 *         # ID
 *         cdef bytes id = row[2]             # <<<<<<<<<<<<<<
 *         #REF
 *         cdef bytes ref = row[3]
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_row, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_id = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1209
 *         cdef bytes id = row[2]
 *         #REF
 *         cdef bytes ref = row[3]             # <<<<<<<<<<<<<<
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_row, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ref = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1211
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_row, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __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 = 1211; __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_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_alt = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1214
 *         #QUAL
 *         cdef object qual
 *         if row[5] == b'.':             # <<<<<<<<<<<<<<
 *             qual = None
 *         else:
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_row, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = (__Pyx_PyBytes_Equals(__pyx_t_7, __pyx_kp_b__21, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1215
 *         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":1217
 *             qual = None
 *         else:
 *             qual = float(row[5])             # <<<<<<<<<<<<<<
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 */
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_row, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_AsDouble(__pyx_t_7); if (unlikely(__pyx_t_9 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyFloat_FromDouble(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_qual = __pyx_t_7;
    __pyx_t_7 = 0;
  }
  __pyx_L14:;

  /* "cyvcf/parser.pyx":1219
 *             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(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_kp_s__24, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((__pyx_t_8 != 0)) {
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_v_filt = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1220
 *         #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_8 = (__Pyx_PyBytes_Equals(__pyx_v_filt, __pyx_n_b_PASS, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_8) {
    __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_filt, __pyx_kp_b__21, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_11 = __pyx_t_10;
  } else {
    __pyx_t_11 = __pyx_t_8;
  }
  if (__pyx_t_11) {

    /* "cyvcf/parser.pyx":1221
 *         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_SET(__pyx_v_filt, Py_None);
    goto __pyx_L15;
  }
  __pyx_L15:;

  /* "cyvcf/parser.pyx":1223
 *              filt = None
 *         #INFO
 *         cdef dict info = self._parse_info(row[7])             # <<<<<<<<<<<<<<
 *         #FORMAT
 *         cdef bytes fmt
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __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 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_info = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1226
 *         #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":1227
 *         cdef bytes fmt
 *         try:
 *             fmt = row[8]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             fmt = None
 */
      if (unlikely(__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_L16_error;}
      }
      __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 8, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L16_error;};
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
      __pyx_v_fmt = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 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_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1228
 *         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_5, &__pyx_t_4, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "cyvcf/parser.pyx":1229
 *             fmt = row[8]
 *         except IndexError:
 *             fmt = None             # <<<<<<<<<<<<<<
 * 
 *         self.curr_record = \
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_fmt, ((PyObject*)Py_None));
      __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_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __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":1232
 * 
 *         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_7 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = PyTuple_New(10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __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);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_id);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_id);
  __Pyx_GIVEREF(__pyx_v_id);
  __Pyx_INCREF(__pyx_v_ref);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_ref);
  __Pyx_GIVEREF(__pyx_v_ref);
  __Pyx_INCREF(__pyx_v_alt);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_alt);
  __Pyx_GIVEREF(__pyx_v_alt);
  __Pyx_INCREF(__pyx_v_qual);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_qual);
  __Pyx_GIVEREF(__pyx_v_qual);
  __Pyx_INCREF(__pyx_v_filt);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_filt);
  __Pyx_GIVEREF(__pyx_v_filt);
  __Pyx_INCREF(__pyx_v_info);
  PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_v_info);
  __Pyx_GIVEREF(__pyx_v_info);
  __Pyx_INCREF(__pyx_v_fmt);
  PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_v_fmt);
  __Pyx_GIVEREF(__pyx_v_fmt);
  __Pyx_INCREF(__pyx_v_self->_sample_indexes);
  PyTuple_SET_ITEM(__pyx_t_4, 9, __pyx_v_self->_sample_indexes);
  __Pyx_GIVEREF(__pyx_v_self->_sample_indexes);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Record)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1231
 *             fmt = None
 * 
 *         self.curr_record = \             # <<<<<<<<<<<<<<
 *              _Record(chrom, pos, id, ref, alt, qual, filt, info, fmt, self._sample_indexes)
 * 
 */
  __Pyx_GIVEREF(__pyx_t_7);
  __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_7);
  __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1235
 * 
 *         # 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));
  __pyx_t_8 = (__pyx_t_11 != 0);
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1236
 *         # 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_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_v_row, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_fmt);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_fmt);
    __Pyx_GIVEREF(__pyx_v_fmt);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_sample_info = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1237
 *         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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_samples); 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);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->samples);
    __Pyx_DECREF(__pyx_v_self->curr_record->samples);
    __pyx_v_self->curr_record->samples = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1238
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_bases); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_bases);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_bases);
    __pyx_v_self->curr_record->gt_bases = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1239
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_types); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_types);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_types);
    __pyx_v_self->curr_record->gt_types = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1240
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_phases); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_phases);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_phases);
    __pyx_v_self->curr_record->gt_phases = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1241
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_depths); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_depths);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_depths);
    __pyx_v_self->curr_record->gt_depths = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1242
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_ref_depths); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_ref_depths);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_ref_depths);
    __pyx_v_self->curr_record->gt_ref_depths = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1243
 *             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.gt_copy_numbers = sample_info.gt_copy_numbers
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_alt_depths); 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 (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_alt_depths);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_alt_depths);
    __pyx_v_self->curr_record->gt_alt_depths = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1244
 *             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.gt_copy_numbers = sample_info.gt_copy_numbers
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_quals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_quals);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_quals);
    __pyx_v_self->curr_record->gt_quals = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1245
 *             self.curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             self.curr_record.gt_quals = sample_info.gt_quals
 *             self.curr_record.gt_copy_numbers = sample_info.gt_copy_numbers             # <<<<<<<<<<<<<<
 *             self.curr_record.num_hom_ref = sample_info.num_hom_ref
 *             self.curr_record.num_het = sample_info.num_het
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_copy_numbers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->curr_record->gt_copy_numbers);
    __Pyx_DECREF(__pyx_v_self->curr_record->gt_copy_numbers);
    __pyx_v_self->curr_record->gt_copy_numbers = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1246
 *             self.curr_record.gt_quals = sample_info.gt_quals
 *             self.curr_record.gt_copy_numbers = sample_info.gt_copy_numbers
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_hom_ref); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_self->curr_record->num_hom_ref = __pyx_t_6;

    /* "cyvcf/parser.pyx":1247
 *             self.curr_record.gt_copy_numbers = sample_info.gt_copy_numbers
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_het); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_self->curr_record->num_het = __pyx_t_6;

    /* "cyvcf/parser.pyx":1248
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_hom_alt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_self->curr_record->num_hom_alt = __pyx_t_6;

    /* "cyvcf/parser.pyx":1249
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_unknown); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_self->curr_record->num_unknown = __pyx_t_6;

    /* "cyvcf/parser.pyx":1250
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_called); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_self->curr_record->num_called = __pyx_t_6;
    goto __pyx_L26;
  }
  __pyx_L26:;

  /* "cyvcf/parser.pyx":1252
 *             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;

  /* "cyvcf/parser.pyx":1190
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 * 
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1255
 * 
 * 
 *     def parse(other, line):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 * 
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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":1259
 * 
 *         #self._load_line(self.reader.next())
 *         cdef list row = line.split('\t')             # <<<<<<<<<<<<<<
 * 
 *         #CHROM
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__57, NULL); 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);
  __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 %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_row = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1262
 * 
 *         #CHROM
 *         cdef bytes chrom = row[0]             # <<<<<<<<<<<<<<
 *         if other._prepend_chr:
 *             chrom = 'chr' + str(chrom)
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_chrom = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1263
 *         #CHROM
 *         cdef bytes chrom = row[0]
 *         if other._prepend_chr:             # <<<<<<<<<<<<<<
 *             chrom = 'chr' + str(chrom)
 *         # POS
 */
  __pyx_t_3 = (__pyx_v_other->_prepend_chr != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1264
 *         cdef bytes chrom = row[0]
 *         if other._prepend_chr:
 *             chrom = 'chr' + str(chrom)             # <<<<<<<<<<<<<<
 *         # POS
 *         cdef int pos = int(row[1])
 */
    __pyx_t_2 = PyTuple_New(1); 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);
    __Pyx_INCREF(__pyx_v_chrom);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
    __Pyx_GIVEREF(__pyx_v_chrom);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_n_s_chr, __pyx_t_1); 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);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":1266
 *             chrom = 'chr' + str(chrom)
 *         # POS
 *         cdef int pos = int(row[1])             # <<<<<<<<<<<<<<
 *         # ID
 *         cdef bytes id = row[2]
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __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_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pos = __pyx_t_4;

  /* "cyvcf/parser.pyx":1268
 *         cdef int pos = int(row[1])
 *         # ID
 *         cdef bytes id = row[2]             # <<<<<<<<<<<<<<
 *         #REF
 *         cdef bytes ref = row[3]
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_row, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_id = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1270
 *         cdef bytes id = row[2]
 *         #REF
 *         cdef bytes ref = row[3]             # <<<<<<<<<<<<<<
 *         #ALT
 *         cdef list alt = other._map(str, row[4].split(','))
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_row, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __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 %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ref = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1272
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = other._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 1272; __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_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_alt = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1275
 *         #QUAL
 *         cdef object qual
 *         if row[5] == b'.':             # <<<<<<<<<<<<<<
 *             qual = None
 *         else:
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b__21, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1276
 *         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":1278
 *             qual = None
 *         else:
 *             qual = float(row[5])             # <<<<<<<<<<<<<<
 *         #FILT
 *         cdef object filt = row[6].split(';') if ';' in row[6] else row[6]
 */
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_qual = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cyvcf/parser.pyx":1280
 *             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(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_kp_s__24, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((__pyx_t_3 != 0)) {
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_v_filt = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1281
 *         #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_3 = (__Pyx_PyBytes_Equals(__pyx_v_filt, __pyx_n_b_PASS, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_v_filt, __pyx_kp_b__21, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_3;
  }
  if (__pyx_t_8) {

    /* "cyvcf/parser.pyx":1282
 *         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_SET(__pyx_v_filt, Py_None);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "cyvcf/parser.pyx":1284
 *              filt = None
 *         #INFO
 *         cdef dict info = other._parse_info(row[7])             # <<<<<<<<<<<<<<
 *         #FORMAT
 *         cdef bytes fmt
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_parse_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_info = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1287
 *         #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":1288
 *         cdef bytes fmt
 *         try:
 *             fmt = row[8]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             fmt = None
 */
      if (unlikely(__pyx_v_row == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
      }
      __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_row, 8, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L6_error;};
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
      __pyx_v_fmt = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 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_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1289
 *         try:
 *             fmt = row[8]
 *         except IndexError:             # <<<<<<<<<<<<<<
 *             fmt = None
 * 
 */
    __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_4) {
      __Pyx_AddTraceback("cyvcf.parser.Reader.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);

      /* "cyvcf/parser.pyx":1290
 *             fmt = row[8]
 *         except IndexError:
 *             fmt = None             # <<<<<<<<<<<<<<
 * 
 *         curr_record = \
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_fmt, ((PyObject*)Py_None));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;
    __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":1293
 * 
 *         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_2 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_chrom);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom);
  __Pyx_GIVEREF(__pyx_v_chrom);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_id);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_id);
  __Pyx_GIVEREF(__pyx_v_id);
  __Pyx_INCREF(__pyx_v_ref);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_ref);
  __Pyx_GIVEREF(__pyx_v_ref);
  __Pyx_INCREF(__pyx_v_alt);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_alt);
  __Pyx_GIVEREF(__pyx_v_alt);
  __Pyx_INCREF(__pyx_v_qual);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_qual);
  __Pyx_GIVEREF(__pyx_v_qual);
  __Pyx_INCREF(__pyx_v_filt);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_filt);
  __Pyx_GIVEREF(__pyx_v_filt);
  __Pyx_INCREF(__pyx_v_info);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_info);
  __Pyx_GIVEREF(__pyx_v_info);
  __Pyx_INCREF(__pyx_v_fmt);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_fmt);
  __Pyx_GIVEREF(__pyx_v_fmt);
  __Pyx_INCREF(__pyx_v_other->_sample_indexes);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_v_other->_sample_indexes);
  __Pyx_GIVEREF(__pyx_v_other->_sample_indexes);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Record)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_curr_record = ((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1296
 * 
 *         # 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));
  __pyx_t_3 = (__pyx_t_8 != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1297
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_parse_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_row, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_fmt);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_fmt);
    __Pyx_GIVEREF(__pyx_v_fmt);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_sample_info = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1298
 *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->samples);
    __Pyx_DECREF(__pyx_v_curr_record->samples);
    __pyx_v_curr_record->samples = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1299
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_bases); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_bases);
    __Pyx_DECREF(__pyx_v_curr_record->gt_bases);
    __pyx_v_curr_record->gt_bases = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1300
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_types); 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);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_types);
    __Pyx_DECREF(__pyx_v_curr_record->gt_types);
    __pyx_v_curr_record->gt_types = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1301
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_phases); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_phases);
    __Pyx_DECREF(__pyx_v_curr_record->gt_phases);
    __pyx_v_curr_record->gt_phases = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1302
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_depths); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_depths);
    __Pyx_DECREF(__pyx_v_curr_record->gt_depths);
    __pyx_v_curr_record->gt_depths = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1303
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_ref_depths); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_ref_depths);
    __Pyx_DECREF(__pyx_v_curr_record->gt_ref_depths);
    __pyx_v_curr_record->gt_ref_depths = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1304
 *             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.gt_copy_numbers = sample_info.gt_copy_numbers
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_alt_depths); 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);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_alt_depths);
    __Pyx_DECREF(__pyx_v_curr_record->gt_alt_depths);
    __pyx_v_curr_record->gt_alt_depths = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1305
 *             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.gt_copy_numbers = sample_info.gt_copy_numbers
 *             curr_record.num_hom_ref = sample_info.num_hom_ref
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_quals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_quals);
    __Pyx_DECREF(__pyx_v_curr_record->gt_quals);
    __pyx_v_curr_record->gt_quals = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1306
 *             curr_record.gt_alt_depths = sample_info.gt_alt_depths
 *             curr_record.gt_quals = sample_info.gt_quals
 *             curr_record.gt_copy_numbers = sample_info.gt_copy_numbers             # <<<<<<<<<<<<<<
 *             curr_record.num_hom_ref = sample_info.num_hom_ref
 *             curr_record.num_het = sample_info.num_het
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_copy_numbers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_curr_record->gt_copy_numbers);
    __Pyx_DECREF(__pyx_v_curr_record->gt_copy_numbers);
    __pyx_v_curr_record->gt_copy_numbers = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1307
 *             curr_record.gt_quals = sample_info.gt_quals
 *             curr_record.gt_copy_numbers = sample_info.gt_copy_numbers
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_hom_ref); 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_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_curr_record->num_hom_ref = __pyx_t_4;

    /* "cyvcf/parser.pyx":1308
 *             curr_record.gt_copy_numbers = sample_info.gt_copy_numbers
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_het); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_curr_record->num_het = __pyx_t_4;

    /* "cyvcf/parser.pyx":1309
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_hom_alt); 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);
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_curr_record->num_hom_alt = __pyx_t_4;

    /* "cyvcf/parser.pyx":1310
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_unknown); 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_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_curr_record->num_unknown = __pyx_t_4;

    /* "cyvcf/parser.pyx":1311
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_num_called); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_curr_record->num_called = __pyx_t_4;
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "cyvcf/parser.pyx":1313
 *             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;

  /* "cyvcf/parser.pyx":1255
 * 
 * 
 *     def parse(other, line):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __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;
}

/* "cyvcf/parser.pyx":1315
 *         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
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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};
    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 = 1315; __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 = 1315; __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 = 1315; __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);

  /* function exit code */
  __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":1320
 *             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_GetModuleGlobalName(__pyx_n_s_pysam); 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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1321
 *         """
 *         if not pysam:
 *             raise Exception('pysam not available, try "pip install pysam"?')             # <<<<<<<<<<<<<<
 * 
 *         if not self.filename:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __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 = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":1323
 *             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 = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1324
 * 
 *         if not self.filename:
 *             raise Exception('Please provide a filename (or a "normal" fsock)')             # <<<<<<<<<<<<<<
 * 
 *         if not self._tabix:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__61, NULL); 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);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":1326
 *             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 = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1327
 * 
 *         if not self._tabix:
 *             self._tabix = pysam.Tabixfile(self.filename)             # <<<<<<<<<<<<<<
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pysam); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Tabixfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __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 = 1327; __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 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_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":1329
 *             self._tabix = pysam.Tabixfile(self.filename)
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':             # <<<<<<<<<<<<<<
 *             chrom = chrom[3:]
 * 
 */
  if ((__pyx_v_self->_prepend_chr != 0)) {
    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_chrom, 0, 3, NULL, NULL, &__pyx_slice__62, 0, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_chr, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __pyx_t_3;
  } else {
    __pyx_t_2 = (__pyx_v_self->_prepend_chr != 0);
  }
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1330
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 *             chrom = chrom[3:]             # <<<<<<<<<<<<<<
 * 
 *         # not sure why tabix needs position -1
 */
    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_chrom, 3, 0, NULL, NULL, &__pyx_slice__63, 1, 0, 1); 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_DECREF_SET(__pyx_v_chrom, __pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "cyvcf/parser.pyx":1333
 * 
 *         # not sure why tabix needs position -1
 *         start = start - 1             # <<<<<<<<<<<<<<
 * 
 *         if end is None:
 */
  __pyx_t_5 = PyNumber_Subtract(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1335
 *         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);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1336
 * 
 *         if end is None:
 *             self.reader = self._tabix.fetch(chrom, start, start+1)             # <<<<<<<<<<<<<<
 *             try:
 *                 return self.next()
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_tabix, __pyx_n_s_fetch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __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 = 1336; __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_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->reader);
    __Pyx_DECREF(__pyx_v_self->reader);
    __pyx_v_self->reader = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1337
 *         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":1338
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:
 *                 return self.next()             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 return None
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L8_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_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_L8_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cyvcf/parser.pyx":1339
 *             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_1, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_5);

        /* "cyvcf/parser.pyx":1340
 *                 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_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L9_exception_handled;
      }
      goto __pyx_L10_except_error;
      __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_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_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:;
    }
  }

  /* "cyvcf/parser.pyx":1342
 *                 return None
 * 
 *         self.reader = self._tabix.fetch(chrom, start, end)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_tabix, __pyx_n_s_fetch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_chrom);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom);
  __Pyx_GIVEREF(__pyx_v_chrom);
  __Pyx_INCREF(__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  __Pyx_INCREF(__pyx_v_end);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
  __Pyx_GIVEREF(__pyx_v_end);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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":1343
 * 
 *         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;

  /* "cyvcf/parser.pyx":1315
 *         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
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1351
 *     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
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1351; __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 = 1351; __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 = 1351; __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 = 1351; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":1352
 * 
 *     def __init__(self, stream, template):
 *         self.writer = csv.writer(stream, delimiter="\t")             # <<<<<<<<<<<<<<
 *         self.template = template
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_csv); 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 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __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 = 1352; __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 = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimiter, __pyx_kp_s__28) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_writer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1353
 *     def __init__(self, stream, template):
 *         self.writer = csv.writer(stream, delimiter="\t")
 *         self.template = template             # <<<<<<<<<<<<<<
 * 
 *         for line in template.metadata.items():
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_template, __pyx_v_template) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1355
 *         self.template = template
 * 
 *         for line in template.metadata.items():             # <<<<<<<<<<<<<<
 *             stream.write('##%s=%s\n' % line)
 *         for line in template.infos.values():
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_metadata); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; __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 = 1355; __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 = 1355; __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 = 1355; __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 = 1355; __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 = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1356
 * 
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_v_line); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __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 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 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;

  /* "cyvcf/parser.pyx":1357
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_infos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __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 = 1357; __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 = 1357; __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 = 1357; __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 = 1357; __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 = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":1358
 *             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 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __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 = 1358; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 1358; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_INFO_ID_s_Number_s_Type_s_Descr, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__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 = 1358; __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 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__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":1359
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_formats); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __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 = 1359; __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 = 1359; __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 = 1359; __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 = 1359; __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 = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, 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_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1360
 *             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 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __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 = 1360; __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 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 1360; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_FORMAT_ID_s_Number_s_Type_s_Des, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__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 = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1361
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_filters); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __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 = 1361; __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 = 1361; __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 = 1361; __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 = 1361; __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 = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1362
 *             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 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __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 = 1362; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_FILTER_ID_s_Description_s, __pyx_t_7); 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_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 = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__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":1364
 *             stream.write('##FILTER=<ID=%s,Description="%s">\n' % tuple(self._map(str, line)))
 * 
 *         self._write_header()             # <<<<<<<<<<<<<<
 * 
 *     def _write_header(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __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;

  /* "cyvcf/parser.pyx":1351
 *     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
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1366
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":1368
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writerow); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fixed_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __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 = 1368; __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 = 1368; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":1366
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1370
 *         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]) \
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1370; __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 = 1370; __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 = 1370; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":1372
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_CHROM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_ID); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_REF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __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 = 1372; __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 = 1372; __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_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cyvcf/parser.pyx":1373
 *         """ 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_alt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_ALT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __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 = 1373; __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 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_QUAL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __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 = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_s__21);
    __pyx_t_5 = __pyx_kp_s__21;
  } else {
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_FILTER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __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 = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_s__21);
    __pyx_t_3 = __pyx_kp_s__21;
  } else {
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
  }

  /* "cyvcf/parser.pyx":1374
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_INFO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __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 = 1374; __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 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "cyvcf/parser.pyx":1373
 *         """ 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_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __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, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_ffs = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":1376
 *                  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 = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "cyvcf/parser.pyx":1377
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]             # <<<<<<<<<<<<<<
 *         self.writer.writerow(ffs + samples)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __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 = 1377; __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 = 1377; __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 = 1377; __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 = 1377; __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 = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_10(__pyx_t_6);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1376
 *                  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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_sample); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __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 = 1376; __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 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __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_v_samples = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":1378
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]
 *         self.writer.writerow(ffs + samples)             # <<<<<<<<<<<<<<
 * 
 *     def _format_alt(self, alt):
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_writerow); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyNumber_Add(__pyx_v_ffs, __pyx_v_samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":1370
 *         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]) \
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1380
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1380; __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 = 1380; __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 = 1380; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  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":1381
 * 
 *     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 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
    __pyx_t_2 = __pyx_v_alt; __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_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __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 = 1381; __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 = 1381; __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 = 1381; __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 = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__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 = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_6) {
      __Pyx_INCREF(__pyx_kp_s__21);
      __pyx_t_5 = __pyx_kp_s__21;
    } else {
      __Pyx_INCREF(__pyx_v_x);
      __pyx_t_5 = __pyx_v_x;
    }
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __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_t_2 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __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;

  /* "cyvcf/parser.pyx":1380
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __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;
}

/* "cyvcf/parser.pyx":1383
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1383; __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 = 1383; __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 = 1383; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_info", 0);

  /* "cyvcf/parser.pyx":1384
 * 
 *     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 = 1384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1385
 *     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(__pyx_kp_s__21);
    __pyx_r = __pyx_kp_s__21;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":1386
 *         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 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_info, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_4)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_4)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __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 = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stringify); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_y);
    __Pyx_GIVEREF(__pyx_v_y);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__24, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1383
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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;
}

/* "cyvcf/parser.pyx":1388
 *         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 "./."
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1388; __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 = 1388; __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 = 1388; __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 = 1388; __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);

  /* function exit code */
  __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":1391
 *         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_tp_new_5cyvcf_6parser___pyx_scope_struct_3_genexpr(__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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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 = 1391; __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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __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 = 1391; __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 = 1391; __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 = 1391; __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 = 1391; __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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_2);
    __Pyx_GIVEREF(__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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__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 = 1391; __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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__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 = 1391; __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 (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __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 = 1391; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  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":1388
 *         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;
  int __pyx_t_4;
  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_tp_new_5cyvcf_6parser___pyx_scope_struct_2__format_sample(__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":1389
 * 
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sample, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_GT); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __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;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":1390
 *     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(__pyx_kp_s__27);
    __pyx_r = __pyx_kp_s__27;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":1391
 *         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 = __pyx_pf_5cyvcf_6parser_6Writer_14_format_sample_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__25, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1388
 *         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 "./."
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __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;
}

/* "cyvcf/parser.pyx":1393
 *         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))
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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__21));
    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 = 1393; __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 = 1393; __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 = 1393; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_stringify", 0);

  /* "cyvcf/parser.pyx":1394
 * 
 *     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 = 1394; __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(__pyx_t_1)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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 = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1395
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __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_x);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(__pyx_v_none);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_none);
    __Pyx_GIVEREF(__pyx_v_none);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":1396
 *         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 != 0)) {
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_none);
    __pyx_t_1 = __pyx_v_none;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1393
 *         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))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
}

/* "cyvcf/parser.pyx":1398
 *         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
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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__21));
    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 = 1398; __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 = 1398; __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 = 1398; __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 = 1398; __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":1400
 *     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 = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":1401
 *         '''``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 = 1401; __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 = 1401; __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 = 1401; __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 = 1401; __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 = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1400
 *     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 != 0)) {
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __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 = __Pyx_PyObject_Call(__pyx_v_func, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {

      /* "cyvcf/parser.pyx":1401
 *         '''``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_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1398
 *         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
 */

  /* function exit code */
  __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;
}

/* "cyvcf/parser.pyx":1403
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */

/* 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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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":1404
 * 
 * def __update_readme():
 *     import sys, vcf             # <<<<<<<<<<<<<<
 *     file('README.rst', 'w').write(vcf.__doc__)
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __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(__pyx_n_s_vcf, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __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":1405
 * def __update_readme():
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)             # <<<<<<<<<<<<<<
 * 
 * # backwards compatibility
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vcf, __pyx_n_s_doc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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 = 1405; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1403
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */

  /* function exit code */
  __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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!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 (unlikely(__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;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->sample);
  Py_CLEAR(p->gt_nums);
  Py_CLEAR(p->site);
  Py_CLEAR(p->data);
  (*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->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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser__Call *p = (struct __pyx_obj_5cyvcf_6parser__Call *)o;
  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("gt_copy_number"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_21gt_copy_number, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_20gt_copy_number)},
  {__Pyx_NAMESTR("is_variant"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_23is_variant, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_22is_variant)},
  {__Pyx_NAMESTR("is_het"), (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_25is_het, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5cyvcf_6parser_5_Call_24is_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_Return_the_VCF__Record_to_which), 0},
  {(char *)"sample", __pyx_getprop_5cyvcf_6parser_5_Call_sample, 0, __Pyx_DOCSTR(__pyx_k_Return_the_name_of_the_sample), 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 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 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*/
  0, /*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*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5cyvcf_6parser__Record(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5cyvcf_6parser__Record *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!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->gt_copy_numbers = ((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 (unlikely(__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;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  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->gt_copy_numbers);
  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);
  (*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->gt_copy_numbers) {
    e = (*v)(p->gt_copy_numbers, 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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser__Record *p = (struct __pyx_obj_5cyvcf_6parser__Record *)o;
  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->gt_copy_numbers);
  p->gt_copy_numbers = ((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_gt_copy_numbers(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_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_The_0_based_start_coordinate_for), 0},
  {(char *)"end", __pyx_getprop_5cyvcf_6parser_7_Record_end, 0, __Pyx_DOCSTR(__pyx_k_The_1_based_end_coordinate_for_t), 0},
  {(char *)"alleles", __pyx_getprop_5cyvcf_6parser_7_Record_alleles, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_all_of_the_alleles_for), 0},
  {(char *)"samples", __pyx_getprop_5cyvcf_6parser_7_Record_samples, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_Call_instances_one_for), 0},
  {(char *)"gt_bases", __pyx_getprop_5cyvcf_6parser_7_Record_gt_bases, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_nucleotide_genotypes_f), 0},
  {(char *)"gt_types", __pyx_getprop_5cyvcf_6parser_7_Record_gt_types, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_numerically_encoded_ge), 0},
  {(char *)"gt_phases", __pyx_getprop_5cyvcf_6parser_7_Record_gt_phases, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_booleans_indicating_wh), 0},
  {(char *)"gt_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_depths, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_integers_indicating_th), 0},
  {(char *)"gt_ref_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_ref_depths, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_integers_indicating_th_2), 0},
  {(char *)"gt_alt_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_alt_depths, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_integers_indicating_th_3), 0},
  {(char *)"gt_quals", __pyx_getprop_5cyvcf_6parser_7_Record_gt_quals, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_integers_indicating_th_4), 0},
  {(char *)"gt_copy_numbers", __pyx_getprop_5cyvcf_6parser_7_Record_gt_copy_numbers, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_integers_indicating_th_5), 0},
  {(char *)"num_hom_ref", __pyx_getprop_5cyvcf_6parser_7_Record_num_hom_ref, 0, __Pyx_DOCSTR(__pyx_k_The_number_of_homozygotes_for_th), 0},
  {(char *)"num_het", __pyx_getprop_5cyvcf_6parser_7_Record_num_het, 0, __Pyx_DOCSTR(__pyx_k_The_number_of_heterozygotes), 0},
  {(char *)"num_hom_alt", __pyx_getprop_5cyvcf_6parser_7_Record_num_hom_alt, 0, __Pyx_DOCSTR(__pyx_k_The_number_of_homozygotes_for_an), 0},
  {(char *)"num_unknown", __pyx_getprop_5cyvcf_6parser_7_Record_num_unknown, 0, __Pyx_DOCSTR(__pyx_k_The_number_of_unknown_e_g_genoty), 0},
  {(char *)"num_called", __pyx_getprop_5cyvcf_6parser_7_Record_num_called, 0, __Pyx_DOCSTR(__pyx_k_The_number_of_called_i_e_NOT_gen), 0},
  {0, 0, 0, 0, 0}
};

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*/
  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_VERSION_TAG|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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!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;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  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);
  (*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->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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser_Reader *p = (struct __pyx_obj_5cyvcf_6parser_Reader *)o;
  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_The_name_of_the_VCF_file_that_th), 0},
  {(char *)"samples", __pyx_getprop_5cyvcf_6parser_6Reader_samples, 0, __Pyx_DOCSTR(__pyx_k_A_list_of_the_samples_in_this_VC), 0},
  {(char *)"formats", __pyx_getprop_5cyvcf_6parser_6Reader_formats, 0, __Pyx_DOCSTR(__pyx_k_A_dict_of_FORMATS_defined_in_thi), 0},
  {(char *)"infos", __pyx_getprop_5cyvcf_6parser_6Reader_infos, 0, __Pyx_DOCSTR(__pyx_k_A_dict_of_INFO_attrs_defined_in), 0},
  {(char *)"filters", __pyx_getprop_5cyvcf_6parser_6Reader_filters, 0, __Pyx_DOCSTR(__pyx_k_A_dict_of_FILTER_attrs_defined_i), 0},
  {(char *)"metadata", __pyx_getprop_5cyvcf_6parser_6Reader_metadata, 0, __Pyx_DOCSTR(__pyx_k__66), 0},
  {(char *)"raw_header", __pyx_getprop_5cyvcf_6parser_6Reader_raw_header, 0, __Pyx_DOCSTR(__pyx_k_Dump_the_raw_unparsed_header_lin), 0},
  {0, 0, 0, 0, 0}
};

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*/
  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_VERSION_TAG|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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *__pyx_freelist_5cyvcf_6parser___pyx_scope_struct___format_sample[8];
static int __pyx_freecount_5cyvcf_6parser___pyx_scope_struct___format_sample = 0;

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct___format_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct___format_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample)))) {
    o = (PyObject*)__pyx_freelist_5cyvcf_6parser___pyx_scope_struct___format_sample[--__pyx_freecount_5cyvcf_6parser___pyx_scope_struct___format_sample];
    memset(o, 0, sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 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);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct___format_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample)))) {
    __pyx_freelist_5cyvcf_6parser___pyx_scope_struct___format_sample[__pyx_freecount_5cyvcf_6parser___pyx_scope_struct___format_sample++] = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)o);
  } else {
    (*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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct___format_sample *)o;
  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 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*/
  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_VERSION_TAG|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*/
  0, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *__pyx_freelist_5cyvcf_6parser___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_5cyvcf_6parser___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5cyvcf_6parser___pyx_scope_struct_1_genexpr[--__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 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);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_5cyvcf_6parser___pyx_scope_struct_1_genexpr[__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_1_genexpr *)o;
  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 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*/
  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_VERSION_TAG|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*/
  0, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *__pyx_freelist_5cyvcf_6parser___pyx_scope_struct_2__format_sample[8];
static int __pyx_freecount_5cyvcf_6parser___pyx_scope_struct_2__format_sample = 0;

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_2__format_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_2__format_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample)))) {
    o = (PyObject*)__pyx_freelist_5cyvcf_6parser___pyx_scope_struct_2__format_sample[--__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_2__format_sample];
    memset(o, 0, sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 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);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_2__format_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample)))) {
    __pyx_freelist_5cyvcf_6parser___pyx_scope_struct_2__format_sample[__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_2__format_sample++] = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)o);
  } else {
    (*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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_2__format_sample *)o;
  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 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*/
  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_VERSION_TAG|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*/
  0, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *__pyx_freelist_5cyvcf_6parser___pyx_scope_struct_3_genexpr[8];
static int __pyx_freecount_5cyvcf_6parser___pyx_scope_struct_3_genexpr = 0;

static PyObject *__pyx_tp_new_5cyvcf_6parser___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5cyvcf_6parser___pyx_scope_struct_3_genexpr[--__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_3_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 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);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr)))) {
    __pyx_freelist_5cyvcf_6parser___pyx_scope_struct_3_genexpr[__pyx_freecount_5cyvcf_6parser___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)o);
  } else {
    (*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) {
  PyObject* tmp;
  struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5cyvcf_6parser___pyx_scope_struct_3_genexpr *)o;
  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 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*/
  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_VERSION_TAG|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*/
  0, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #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_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_kp_s_Allele_number_not_found_in_list, __pyx_k_Allele_number_not_found_in_list, sizeof(__pyx_k_Allele_number_not_found_in_list), 0, 0, 1, 0},
  {&__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_kp_s_CHROM_POS_ID_REF_ALT_QUAL_FILTE, __pyx_k_CHROM_POS_ID_REF_ALT_QUAL_FILTE, sizeof(__pyx_k_CHROM_POS_ID_REF_ALT_QUAL_FILTE), 0, 0, 1, 0},
  {&__pyx_n_s_CIGAR, __pyx_k_CIGAR, sizeof(__pyx_k_CIGAR), 0, 0, 1, 1},
  {&__pyx_n_s_CN, __pyx_k_CN, sizeof(__pyx_k_CN), 0, 0, 1, 1},
  {&__pyx_kp_s_Call_sample_s_GT_s_GQ_s, __pyx_k_Call_sample_s_GT_s_GQ_s, sizeof(__pyx_k_Call_sample_s_GT_s_GQ_s), 0, 0, 1, 0},
  {&__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_kp_s_Expected_column_definition_line, __pyx_k_Expected_column_definition_line, sizeof(__pyx_k_Expected_column_definition_line), 0, 0, 1, 0},
  {&__pyx_n_s_FILTER, __pyx_k_FILTER, sizeof(__pyx_k_FILTER), 0, 0, 1, 1},
  {&__pyx_kp_s_FILTER_2, __pyx_k_FILTER_2, sizeof(__pyx_k_FILTER_2), 0, 0, 1, 0},
  {&__pyx_kp_s_FILTER_ID_P_id_Description_P_de, __pyx_k_FILTER_ID_P_id_Description_P_de, sizeof(__pyx_k_FILTER_ID_P_id_Description_P_de), 0, 0, 1, 0},
  {&__pyx_kp_s_FILTER_ID_s_Description_s, __pyx_k_FILTER_ID_s_Description_s, sizeof(__pyx_k_FILTER_ID_s_Description_s), 0, 0, 1, 0},
  {&__pyx_n_s_FORMAT, __pyx_k_FORMAT, sizeof(__pyx_k_FORMAT), 0, 0, 1, 1},
  {&__pyx_kp_s_FORMAT_2, __pyx_k_FORMAT_2, sizeof(__pyx_k_FORMAT_2), 0, 0, 1, 0},
  {&__pyx_kp_s_FORMAT_ID_P_id_Number_P_number, __pyx_k_FORMAT_ID_P_id_Number_P_number, sizeof(__pyx_k_FORMAT_ID_P_id_Number_P_number), 0, 0, 1, 0},
  {&__pyx_kp_s_FORMAT_ID_s_Number_s_Type_s_Des, __pyx_k_FORMAT_ID_s_Number_s_Type_s_Des, sizeof(__pyx_k_FORMAT_ID_s_Number_s_Type_s_Des), 0, 0, 1, 0},
  {&__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_s_Filter_2, __pyx_k_Filter_2, sizeof(__pyx_k_Filter_2), 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_s_Format_2, __pyx_k_Format_2, sizeof(__pyx_k_Format_2), 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_kp_s_INFO_2, __pyx_k_INFO_2, sizeof(__pyx_k_INFO_2), 0, 0, 1, 0},
  {&__pyx_kp_s_INFO_ID_P_id_Number_P_number_d, __pyx_k_INFO_ID_P_id_Number_P_number_d, sizeof(__pyx_k_INFO_ID_P_id_Number_P_number_d), 0, 0, 1, 0},
  {&__pyx_kp_s_INFO_ID_s_Number_s_Type_s_Descr, __pyx_k_INFO_ID_s_Number_s_Type_s_Descr, sizeof(__pyx_k_INFO_ID_s_Number_s_Type_s_Descr), 0, 0, 1, 0},
  {&__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_s_Info_2, __pyx_k_Info_2, sizeof(__pyx_k_Info_2), 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_kp_s_One_of_the_FILTER_lines_is_malfo, __pyx_k_One_of_the_FILTER_lines_is_malfo, sizeof(__pyx_k_One_of_the_FILTER_lines_is_malfo), 0, 0, 1, 0},
  {&__pyx_kp_s_One_of_the_FORMAT_lines_is_malfo, __pyx_k_One_of_the_FORMAT_lines_is_malfo, sizeof(__pyx_k_One_of_the_FORMAT_lines_is_malfo), 0, 0, 1, 0},
  {&__pyx_kp_s_One_of_the_INFO_lines_is_malform, __pyx_k_One_of_the_INFO_lines_is_malform, sizeof(__pyx_k_One_of_the_INFO_lines_is_malform), 0, 0, 1, 0},
  {&__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_kp_s_P_key_P_val, __pyx_k_P_key_P_val, sizeof(__pyx_k_P_key_P_val), 0, 0, 1, 0},
  {&__pyx_kp_s_Parse_the_metadat_in_the_header, __pyx_k_Parse_the_metadat_in_the_header, sizeof(__pyx_k_Parse_the_metadat_in_the_header), 0, 0, 1, 0},
  {&__pyx_kp_s_Please_provide_a_filename_or_a_n, __pyx_k_Please_provide_a_filename_or_a_n, sizeof(__pyx_k_Please_provide_a_filename_or_a_n), 0, 0, 1, 0},
  {&__pyx_n_s_QUAL, __pyx_k_QUAL, sizeof(__pyx_k_QUAL), 0, 0, 1, 1},
  {&__pyx_kp_s_README_rst, __pyx_k_README_rst, sizeof(__pyx_k_README_rst), 0, 0, 1, 0},
  {&__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_SampleInfo_2, __pyx_k_SampleInfo_2, sizeof(__pyx_k_SampleInfo_2), 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_kp_s_Users_arq5x_Documents_SourceCod, __pyx_k_Users_arq5x_Documents_SourceCod, sizeof(__pyx_k_Users_arq5x_Documents_SourceCod), 0, 0, 1, 0},
  {&__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_kp_s_VCF_Writer, __pyx_k_VCF_Writer, sizeof(__pyx_k_VCF_Writer), 0, 0, 1, 0},
  {&__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_Writer___init, __pyx_k_Writer___init, sizeof(__pyx_k_Writer___init), 0, 0, 1, 1},
  {&__pyx_n_s_Writer__format_alt, __pyx_k_Writer__format_alt, sizeof(__pyx_k_Writer__format_alt), 0, 0, 1, 1},
  {&__pyx_n_s_Writer__format_info, __pyx_k_Writer__format_info, sizeof(__pyx_k_Writer__format_info), 0, 0, 1, 1},
  {&__pyx_n_s_Writer__format_sample, __pyx_k_Writer__format_sample, sizeof(__pyx_k_Writer__format_sample), 0, 0, 1, 1},
  {&__pyx_n_s_Writer__map, __pyx_k_Writer__map, sizeof(__pyx_k_Writer__map), 0, 0, 1, 1},
  {&__pyx_n_s_Writer__stringify, __pyx_k_Writer__stringify, sizeof(__pyx_k_Writer__stringify), 0, 0, 1, 1},
  {&__pyx_n_s_Writer__write_header, __pyx_k_Writer__write_header, sizeof(__pyx_k_Writer__write_header), 0, 0, 1, 1},
  {&__pyx_n_s_Writer_write_record, __pyx_k_Writer_write_record, sizeof(__pyx_k_Writer_write_record), 0, 0, 1, 1},
  {&__pyx_kp_s_You_must_provide_at_least_fsock, __pyx_k_You_must_provide_at_least_fsock, sizeof(__pyx_k_You_must_provide_at_least_fsock), 0, 0, 1, 0},
  {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
  {&__pyx_kp_b__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 0, 0},
  {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
  {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0},
  {&__pyx_kp_b__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 0, 0},
  {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0},
  {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
  {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0},
  {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0},
  {&__pyx_kp_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 0},
  {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
  {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0},
  {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
  {&__pyx_kp_s__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 1, 0},
  {&__pyx_kp_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 0},
  {&__pyx_kp_s__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 0, 1, 0},
  {&__pyx_kp_s__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 0, 1, 0},
  {&__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_args, __pyx_k_args, sizeof(__pyx_k_args), 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_close, __pyx_k_close, sizeof(__pyx_k_close), 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_cyvcf_parser, __pyx_k_cyvcf_parser, sizeof(__pyx_k_cyvcf_parser), 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_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 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_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_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_pattern, __pyx_k_format_pattern, sizeof(__pyx_k_format_pattern), 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_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_get, __pyx_k_get, sizeof(__pyx_k_get), 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_copy_number, __pyx_k_gt_copy_number, sizeof(__pyx_k_gt_copy_number), 0, 0, 1, 1},
  {&__pyx_n_s_gt_copy_numbers, __pyx_k_gt_copy_numbers, sizeof(__pyx_k_gt_copy_numbers), 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_kp_s_gz, __pyx_k_gz, sizeof(__pyx_k_gz), 0, 0, 1, 0},
  {&__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_import, __pyx_k_import, sizeof(__pyx_k_import), 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_init, __pyx_k_init, sizeof(__pyx_k_init), 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_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 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_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_metadata, __pyx_k_metadata, sizeof(__pyx_k_metadata), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 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_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_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 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_kp_s_pysam_not_available_try_pip_inst, __pyx_k_pysam_not_available_try_pip_inst, sizeof(__pyx_k_pysam_not_available_try_pip_inst), 0, 0, 1, 0},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 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_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
  {&__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_kp_s_samples_gt_bases_gt_types_gt_pha, __pyx_k_samples_gt_bases_gt_types_gt_pha, sizeof(__pyx_k_samples_gt_bases_gt_types_gt_pha), 0, 0, 1, 0},
  {&__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_send, __pyx_k_send, sizeof(__pyx_k_send), 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_stringify, __pyx_k_stringify, sizeof(__pyx_k_stringify), 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_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 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_update_readme, __pyx_k_update_readme, sizeof(__pyx_k_update_readme), 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_vcf_metadata_parser, __pyx_k_vcf_metadata_parser, sizeof(__pyx_k_vcf_metadata_parser), 0, 0, 1, 1},
  {&__pyx_n_s_vcf_metadata_parser___init, __pyx_k_vcf_metadata_parser___init, sizeof(__pyx_k_vcf_metadata_parser___init), 0, 0, 1, 1},
  {&__pyx_n_s_vcf_metadata_parser_read_filter, __pyx_k_vcf_metadata_parser_read_filter, sizeof(__pyx_k_vcf_metadata_parser_read_filter), 0, 0, 1, 1},
  {&__pyx_n_s_vcf_metadata_parser_read_format, __pyx_k_vcf_metadata_parser_read_format, sizeof(__pyx_k_vcf_metadata_parser_read_format), 0, 0, 1, 1},
  {&__pyx_n_s_vcf_metadata_parser_read_info, __pyx_k_vcf_metadata_parser_read_info, sizeof(__pyx_k_vcf_metadata_parser_read_info), 0, 0, 1, 1},
  {&__pyx_n_s_vcf_metadata_parser_read_meta, __pyx_k_vcf_metadata_parser_read_meta, sizeof(__pyx_k_vcf_metadata_parser_read_meta), 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_header, __pyx_k_write_header, sizeof(__pyx_k_write_header), 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_GetBuiltinName(__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_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_cmp = __Pyx_GetBuiltinName(__pyx_n_s_cmp); if (!__pyx_builtin_cmp) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_file = __Pyx_GetBuiltinName(__pyx_n_s_file); if (!__pyx_builtin_file) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #else
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __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":65
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')             # <<<<<<<<<<<<<<
 * 
 *     def read_info(self, info_string):
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_P_key_P_val); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "cyvcf/parser.pyx":75
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_number); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "cyvcf/parser.pyx":81
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cyvcf/parser.pyx":82
 * 
 *         info = _Info(match.group('id'), num,
 *                      match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), info)
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_n_s_type); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "cyvcf/parser.pyx":84
 *                      match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), info)             # <<<<<<<<<<<<<<
 * 
 *     def read_filter(self, filter_string):
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cyvcf/parser.pyx":93
 *                 "One of the FILTER lines is malformed: %s" % filter_string)
 * 
 *         filt = _Filter(match.group('id'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), filt)
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "cyvcf/parser.pyx":95
 *         filt = _Filter(match.group('id'), match.group('desc'))
 * 
 *         return (match.group('id'), filt)             # <<<<<<<<<<<<<<
 * 
 *     def read_format(self, format_string):
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cyvcf/parser.pyx":105
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_number); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cyvcf/parser.pyx":111
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cyvcf/parser.pyx":112
 * 
 *         form = _Format(match.group('id'), num,
 *                        match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), form)
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_type); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "cyvcf/parser.pyx":114
 *                        match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), form)             # <<<<<<<<<<<<<<
 * 
 *     def read_meta(self, meta_string):
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cyvcf/parser.pyx":118
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_key); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cyvcf/parser.pyx":144
 *         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_tuple__18 = PyTuple_Pack(1, __pyx_kp_s__17); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "cyvcf/parser.pyx":198
 *                                         if a != '.' else '.' for a in alleles])
 *             except KeyError:
 *                 sys.stderr.write("Allele number not found in list of alleles\n")             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Allele_number_not_found_in_list); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cyvcf/parser.pyx":455
 *         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_tuple__26 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cyvcf/parser.pyx":815
 *             else:
 *                 # first remove both "<" and ">" from ALT
 *                 return self.ALT[0].strip('<>')             # <<<<<<<<<<<<<<
 *         else:
 *             return "unknown"
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s__29); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "cyvcf/parser.pyx":869
 * 
 *         if not (fsock or filename):
 *             raise Exception('You must provide at least fsock or filename')             # <<<<<<<<<<<<<<
 * 
 *         if filename:
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_You_must_provide_at_least_fsock); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cyvcf/parser.pyx":883
 *             self.filename = filename
 * 
 *         if compressed or (filename and filename.endswith('.gz')):             # <<<<<<<<<<<<<<
 *             self.reader = gzip.GzipFile(fileobj=self.reader)
 * 
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_gz); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "cyvcf/parser.pyx":953
 * 
 *         line = self.reader.next()
 *         while line.startswith('##'):             # <<<<<<<<<<<<<<
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s__33); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "cyvcf/parser.pyx":955
 *         while line.startswith('##'):
 *             self._header_lines.append(line)
 *             line = line.rstrip('\n')             # <<<<<<<<<<<<<<
 * 
 *             if line.startswith('##INFO'):
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s__35); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cyvcf/parser.pyx":957
 *             line = line.rstrip('\n')
 * 
 *             if line.startswith('##INFO'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_info(line)
 *                 self.infos[key] = val
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_INFO_2); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cyvcf/parser.pyx":961
 *                 self.infos[key] = val
 * 
 *             elif line.startswith('##FILTER'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_filter(line)
 *                 self.filters[key] = val
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_FILTER_2); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "cyvcf/parser.pyx":965
 *                 self.filters[key] = val
 * 
 *             elif line.startswith('##FORMAT'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_format(line)
 *                 self.formats[key] = val
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_FORMAT_2); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cyvcf/parser.pyx":975
 *             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_tuple__41 = PyTuple_Pack(1, __pyx_kp_s__40); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cyvcf/parser.pyx":979
 *             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_slice__42 = PySlice_New(__pyx_int_9, Py_None, Py_None); if (unlikely(!__pyx_slice__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__42);
  __Pyx_GIVEREF(__pyx_slice__42);

  /* "cyvcf/parser.pyx":983
 *             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_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_Expected_column_definition_line); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cyvcf/parser.pyx":1000
 *             return {}
 * 
 *         entries = info_str.split(';')             # <<<<<<<<<<<<<<
 *         retdict = {}
 * 
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cyvcf/parser.pyx":1008
 *         # for entry in entries:
 *         for i in xrange(n):
 *             entry = entries[i].split('=')             # <<<<<<<<<<<<<<
 *             # entry = entry.split('=')
 *             ID = entry[0]
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s__45); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cyvcf/parser.pyx":1017
 *                     entry_type = RESERVED_INFO[ID]
 *                 except KeyError:
 *                     if entry[1:]:             # <<<<<<<<<<<<<<
 *                         entry_type = 'String'
 *                     else:
 */
  __pyx_slice__47 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__47);
  __Pyx_GIVEREF(__pyx_slice__47);

  /* "cyvcf/parser.pyx":1023
 * 
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = self._map(int, vals)
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cyvcf/parser.pyx":1029
 *                     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_tuple__49 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cyvcf/parser.pyx":1054
 *         '''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_tuple__50 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cyvcf/parser.pyx":1153
 *         # 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_tuple__51 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cyvcf/parser.pyx":1178
 * 
 * 
 *             vals = vals.split(',')             # <<<<<<<<<<<<<<
 * 
 *             if entry_type == 'Integer':
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cyvcf/parser.pyx":1196
 *         cdef list row
 *         try:
 *             row = self.reader.next().rstrip().split('\t')             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             raise StopIteration
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s__28); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cyvcf/parser.pyx":1211
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cyvcf/parser.pyx":1219
 *             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_tuple__56 = PyTuple_Pack(1, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cyvcf/parser.pyx":1259
 * 
 *         #self._load_line(self.reader.next())
 *         cdef list row = line.split('\t')             # <<<<<<<<<<<<<<
 * 
 *         #CHROM
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s__28); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cyvcf/parser.pyx":1272
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = other._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cyvcf/parser.pyx":1280
 *             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_tuple__59 = PyTuple_Pack(1, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cyvcf/parser.pyx":1321
 *         """
 *         if not pysam:
 *             raise Exception('pysam not available, try "pip install pysam"?')             # <<<<<<<<<<<<<<
 * 
 *         if not self.filename:
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_pysam_not_available_try_pip_inst); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cyvcf/parser.pyx":1324
 * 
 *         if not self.filename:
 *             raise Exception('Please provide a filename (or a "normal" fsock)')             # <<<<<<<<<<<<<<
 * 
 *         if not self._tabix:
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Please_provide_a_filename_or_a_n); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "cyvcf/parser.pyx":1329
 *             self._tabix = pysam.Tabixfile(self.filename)
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':             # <<<<<<<<<<<<<<
 *             chrom = chrom[3:]
 * 
 */
  __pyx_slice__62 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__62);
  __Pyx_GIVEREF(__pyx_slice__62);

  /* "cyvcf/parser.pyx":1330
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 *             chrom = chrom[3:]             # <<<<<<<<<<<<<<
 * 
 *         # not sure why tabix needs position -1
 */
  __pyx_slice__63 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__63);
  __Pyx_GIVEREF(__pyx_slice__63);

  /* "cyvcf/parser.pyx":1391
 *         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_tuple__64 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "cyvcf/parser.pyx":1405
 * def __update_readme():
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)             # <<<<<<<<<<<<<<
 * 
 * # backwards compatibility
 */
  __pyx_tuple__65 = PyTuple_Pack(2, __pyx_kp_s_README_rst, __pyx_n_s_w); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "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_tuple__67 = PyTuple_Pack(2, __pyx_n_s_SampleInfo_2, __pyx_kp_s_samples_gt_bases_gt_types_gt_pha); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "cyvcf/parser.pyx":47
 * 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_tuple__68 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_init, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":67
 *         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_tuple__70 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_info_string, __pyx_n_s_match, __pyx_n_s_num, __pyx_n_s_info); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_info, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":86
 *         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_tuple__72 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filter_string, __pyx_n_s_match, __pyx_n_s_filt); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_filter, 86, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":97
 *         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_tuple__74 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_format_string, __pyx_n_s_match, __pyx_n_s_num, __pyx_n_s_form); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_format, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":116
 *         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_tuple__76 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_meta_string, __pyx_n_s_match); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_meta, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1351
 *     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_tuple__78 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_template, __pyx_n_s_line); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_init, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1366
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_write_header, 1366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1370
 *         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_tuple__82 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_record, __pyx_n_s_ffs, __pyx_n_s_samples, __pyx_n_s_sample); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_write_record, 1370, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1380
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */
  __pyx_tuple__84 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_alt, __pyx_n_s_x); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_format_alt, 1380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1383
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */
  __pyx_tuple__86 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_info, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_format_info, 1383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1388
 *         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_tuple__88 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fmt, __pyx_n_s_sample, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_format_sample, 1388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1393
 *         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_tuple__90 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_none); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_stringify, 1393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__92 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__21)); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "cyvcf/parser.pyx":1398
 *         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_tuple__93 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_func, __pyx_n_s_iterable, __pyx_n_s_none, __pyx_n_s_x); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_map, 1398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__95 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__21)); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "cyvcf/parser.pyx":1403
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */
  __pyx_tuple__96 = PyTuple_Pack(2, __pyx_n_s_sys, __pyx_n_s_vcf); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_update_readme, 1403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __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_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_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_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __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 PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  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;};
  }
  #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
  /*--- 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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser__Call.tp_print = 0;
  #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 = 121; __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 = 121; __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 = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser__Record.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "_Record", (PyObject *)&__pyx_type_5cyvcf_6parser__Record) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __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 = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser_Reader.tp_print = 0;
  #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 = 844; __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 = 844; __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 = 844; __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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser___pyx_scope_struct___format_sample.tp_print = 0;
  __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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser___pyx_scope_struct_1_genexpr.tp_print = 0;
  __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 = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser___pyx_scope_struct_2__format_sample.tp_print = 0;
  __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 = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser___pyx_scope_struct_3_genexpr.tp_print = 0;
  __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(__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 (PyDict_SetItem(__pyx_d, __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(__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 (PyDict_SetItem(__pyx_d, __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(__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 (PyDict_SetItem(__pyx_d, __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(__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 (PyDict_SetItem(__pyx_d, __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(__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 (PyDict_SetItem(__pyx_d, __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(__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 (PyDict_SetItem(__pyx_d, __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(__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 (PyDict_SetItem(__pyx_d, __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 (PyDict_SetItem(__pyx_d, __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;
    }
    goto __pyx_L4_except_error;
    __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(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_AA, __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, __pyx_n_s_AC, __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, __pyx_n_s_AF, __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, __pyx_n_s_AN, __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, __pyx_n_s_BQ, __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, __pyx_n_s_CIGAR, __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, __pyx_n_s_DB, __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, __pyx_n_s_DP, __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, __pyx_n_s_END, __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, __pyx_n_s_H2, __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, __pyx_n_s_MQ, __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, __pyx_n_s_MQ0, __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, __pyx_n_s_NS, __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, __pyx_n_s_SB, __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, __pyx_n_s_SOMATIC, __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, __pyx_n_s_VALIDATED, __pyx_n_s_Flag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RESERVED_INFO, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__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(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_GT, __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, __pyx_n_s_DP, __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, __pyx_n_s_FT, __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, __pyx_n_s_GL, __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, __pyx_n_s_GQ, __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, __pyx_n_s_HQ, __pyx_n_s_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RESERVED_FORMAT, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_num);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_num);
  __Pyx_GIVEREF(__pyx_n_s_num);
  __Pyx_INCREF(__pyx_n_s_type);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_type);
  __Pyx_GIVEREF(__pyx_n_s_type);
  __Pyx_INCREF(__pyx_n_s_desc);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_desc);
  __Pyx_GIVEREF(__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(__pyx_n_s_Info_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Info_2);
  __Pyx_GIVEREF(__pyx_n_s_Info_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __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(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_desc);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_desc);
  __Pyx_GIVEREF(__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(__pyx_n_s_Filter_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_Filter_2);
  __Pyx_GIVEREF(__pyx_n_s_Filter_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __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(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_d, __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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_num);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_num);
  __Pyx_GIVEREF(__pyx_n_s_num);
  __Pyx_INCREF(__pyx_n_s_type);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_type);
  __Pyx_GIVEREF(__pyx_n_s_type);
  __Pyx_INCREF(__pyx_n_s_desc);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_desc);
  __Pyx_GIVEREF(__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(__pyx_n_s_Format_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Format_2);
  __Pyx_GIVEREF(__pyx_n_s_Format_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __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(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__67, 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 (PyDict_SetItem(__pyx_d, __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":39
 * 
 * 
 * HOM_REF = 0             # <<<<<<<<<<<<<<
 * HET = 1
 * HOM_ALT = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HOM_REF, __pyx_int_0) < 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_HET, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":41
 * HOM_REF = 0
 * HET = 1
 * HOM_ALT = 3             # <<<<<<<<<<<<<<
 * UNKNOWN = 2
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HOM_ALT, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":42
 * HET = 1
 * HOM_ALT = 3
 * UNKNOWN = 2             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNKNOWN, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":45
 * 
 * 
 * class _vcf_metadata_parser(object):             # <<<<<<<<<<<<<<
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_vcf_metadata_parser, __pyx_n_s_vcf_metadata_parser, (PyObject *) NULL, __pyx_n_s_cyvcf_parser, __pyx_kp_s_Parse_the_metadat_in_the_header); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "cyvcf/parser.pyx":47
 * 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_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_1__init__, 0, __pyx_n_s_vcf_metadata_parser___init, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":67
 *         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_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_3read_info, 0, __pyx_n_s_vcf_metadata_parser_read_info, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_info, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":86
 *         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_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter, 0, __pyx_n_s_vcf_metadata_parser_read_filter, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_filter, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":97
 *         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_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_7read_format, 0, __pyx_n_s_vcf_metadata_parser_read_format, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_format, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":116
 *         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_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta, 0, __pyx_n_s_vcf_metadata_parser_read_meta, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_meta, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":45
 * 
 * 
 * class _vcf_metadata_parser(object):             # <<<<<<<<<<<<<<
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_vcf_metadata_parser, __pyx_t_7, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vcf_metadata_parser, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":184
 * 
 *     @property
 *     def gt_bases(self):             # <<<<<<<<<<<<<<
 *         '''The actual genotype alleles.
 *            E.g. if VCF genotype is 0/1, return A/G
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_bases); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":183
 *         def __get__(self): return self.phased
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_bases(self):
 *         '''The actual genotype alleles.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 184; __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":203
 * 
 *     @property
 *     def gt_type(self):             # <<<<<<<<<<<<<<
 *         '''The type of genotype.
 *            0 / 00000000 hom ref
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_type); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":202
 *             return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_type(self):
 *         '''The type of genotype.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 203; __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":240
 * 
 *     @property
 *     def gt_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that led to the genotype
 *         call for this sample.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_depth); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":239
 *         return gt_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_depth(self):
 *         '''The depth of aligned sequences that led to the genotype
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 240; __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":255
 * 
 *     @property
 *     def gt_ref_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that supported the
 *         reference allele for this sample.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_ref_depth); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":254
 *             return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_ref_depth(self):
 *         '''The depth of aligned sequences that supported the
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 255; __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":280
 * 
 *     @property
 *     def gt_alt_depth(self):             # <<<<<<<<<<<<<<
 *         '''The depth of aligned sequences that supported the
 *         alternate allele for this sample.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_alt_depth); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":279
 *             return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_alt_depth(self):
 *         '''The depth of aligned sequences that supported the
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 280; __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":313
 * 
 *     @property
 *     def gt_qual(self):             # <<<<<<<<<<<<<<
 *         '''The PHRED-scaled quality of genotype
 *         call for this sample.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_qual); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":312
 *             return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_qual(self):
 *         '''The PHRED-scaled quality of genotype
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 313; __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":328
 * 
 *     @property
 *     def gt_copy_number(self):             # <<<<<<<<<<<<<<
 *         '''The copy number prediction for this sample.
 *         '''
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_gt_copy_number); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":327
 *             return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_copy_number(self):
 *         '''The copy number prediction for this sample.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5cyvcf_6parser__Call->tp_dict, __pyx_n_s_gt_copy_number, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __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":342
 * 
 *     @property
 *     def is_variant(self):             # <<<<<<<<<<<<<<
 *         """ Return True if not a reference call """
 *         if not self.called:
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_is_variant); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":341
 *             return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_variant(self):
 *         """ Return True if not a reference call """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 342; __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":349
 * 
 *     @property
 *     def is_het(self):             # <<<<<<<<<<<<<<
 *         """ Return True for heterozygous calls """
 *         if not self.called:
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Call, __pyx_n_s_is_het); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":348
 *         return self.gt_type != HOM_REF
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_het(self):
 *         """ Return True for heterozygous calls """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 349; __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":629
 * 
 *     @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_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_call_rate); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":628
 *             return self.num_called
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def call_rate(self):
 *         """ The fraction of genotypes that were actually called. """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 629; __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":634
 * 
 *     @property
 *     def aaf(self):             # <<<<<<<<<<<<<<
 *         """ The allele frequency of the alternate allele.
 *            NOTE 1: Punt if more than one alternate allele.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_aaf); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":633
 *         return float(self.num_called) / float(len(self.samples))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def aaf(self):
 *         """ The allele frequency of the alternate allele.
 */
  __pyx_t_1 = PyTuple_New(1); 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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 634; __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 nucl_diversity(self):             # <<<<<<<<<<<<<<
 *         """
 *         pi_hat (estimation of nucleotide diversity) for the site.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_nucl_diversity); 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);

  /* "cyvcf/parser.pyx":651
 *             return float(het + 2*hom_alt)/float(num_chroms)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nucl_diversity(self):
 *         """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, 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(__pyx_t_1); __pyx_t_1 = 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 = 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":688
 * 
 *     @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_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_snp); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":687
 *         return [s for s in self.samples if s.gt_type is None]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_snp(self):
 *         """ Return whether or not the variant is a SNP """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 688; __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":697
 * 
 *     @property
 *     def is_indel(self):             # <<<<<<<<<<<<<<
 *         """ Return whether or not the variant is an INDEL """
 *         is_sv = self.is_sv
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_indel); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":696
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_indel(self):
 *         """ Return whether or not the variant is an INDEL """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 697; __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":716
 * 
 *     @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_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_sv); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":715
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_sv(self):
 *         """ Return whether or not the variant is a structural variant """
 */
  __pyx_t_1 = PyTuple_New(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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 716; __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":723
 * 
 *     @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_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_transition); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":722
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_transition(self):
 *         """ Return whether or not the SNP is a transition """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 723; __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":740
 * 
 *     @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_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_deletion); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":739
 *         else: return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_deletion(self):
 *         """ Return whether or not the INDEL is a deletion """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 740; __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":756
 * 
 *     @property
 *     def var_type(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the type of variant [snp, indel, unknown]
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_var_type); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":755
 *         else: return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def var_type(self):
 *         """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 756; __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":771
 * 
 *     @property
 *     def var_subtype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the subtype of variant.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_var_subtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":770
 *             return "unknown"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def var_subtype(self):
 *         """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 771; __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":820
 * 
 *     @property
 *     def sv_end(self):             # <<<<<<<<<<<<<<
 *         """ Return the end position for the SV """
 *         if self.is_sv:
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_sv_end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":819
 *             return "unknown"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sv_end(self):
 *         """ Return the end position for the SV """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 820; __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":827
 * 
 *     @property
 *     def is_sv_precise(self):             # <<<<<<<<<<<<<<
 *         """ Return whether the SV cordinates are mapped
 *             to 1 b.p. resolution.
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_sv_precise); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":826
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_sv_precise(self):
 *         """ Return whether the SV cordinates are mapped
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __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 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 827; __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":839
 * 
 *     @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_GetNameInClass((PyObject *)__pyx_ptype_5cyvcf_6parser__Record, __pyx_n_s_is_monomorphic); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":838
 *             return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_monomorphic(self):
 *         """ Return True for reference calls """
 */
  __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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 839; __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":1346
 * 
 * 
 * class Writer(object):             # <<<<<<<<<<<<<<
 *     """ VCF Writer """
 * 
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); 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);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_Writer, __pyx_n_s_Writer, (PyObject *) NULL, __pyx_n_s_cyvcf_parser, __pyx_kp_s_VCF_Writer); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "cyvcf/parser.pyx":1349
 *     """ VCF Writer """
 * 
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, stream, template):
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_CHROM_POS_ID_REF_ALT_QUAL_FILTE, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_fixed_fields, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1351
 *     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_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_1__init__, 0, __pyx_n_s_Writer___init, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1366
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_3_write_header, 0, __pyx_n_s_Writer__write_header, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_write_header, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1370
 *         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_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_5write_record, 0, __pyx_n_s_Writer_write_record, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_write_record, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1380
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_7_format_alt, 0, __pyx_n_s_Writer__format_alt, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_format_alt, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1383
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_9_format_info, 0, __pyx_n_s_Writer__format_info, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_format_info, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1388
 *         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_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_11_format_sample, 0, __pyx_n_s_Writer__format_sample, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_format_sample, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1393
 *         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_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_13_stringify, 0, __pyx_n_s_Writer__stringify, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__92);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_stringify, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1398
 *         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_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_15_map, 0, __pyx_n_s_Writer__map, NULL, __pyx_n_s_cyvcf_parser, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__95);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_map, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1346
 * 
 * 
 * class Writer(object):             # <<<<<<<<<<<<<<
 *     """ VCF Writer """
 * 
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Writer, __pyx_t_7, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Writer, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1403
 *                 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_cyvcf_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_update_readme, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1408
 * 
 * # backwards compatibility
 * VCFReader = Reader             # <<<<<<<<<<<<<<
 * VCFWriter = Writer
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VCFReader, ((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser_Reader))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1409
 * # backwards compatibility
 * VCFReader = Reader
 * VCFWriter = Writer             # <<<<<<<<<<<<<<
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Writer); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VCFWriter, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __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(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__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);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  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_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (result) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
#endif
    result = (*call)(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    Py_LeaveRecursiveCall();
#endif
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *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,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" 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,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        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 *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                if (PyObject_IsSubclass(instance_class, type)) {
                    type = instance_class;
                } else {
                    instance_class = NULL;
                }
            }
        }
        if (!instance_class) {
            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 = PyObject_Call(type, args, NULL);
            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 PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else 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 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 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 (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *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;
    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 void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

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 {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get, key, default_value, NULL);
    }
#endif
    return value;
}

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)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result = memcmp(ps1, ps2, (size_t)length);
            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 int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        #if CYTHON_PEP393_ENABLED
        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_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;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

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%.1s 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 PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (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 = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, __pyx_n_s_items, d);
    else
        return PyDict_Items(d);
}

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
    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
    if (likely(nb) && likely(nb->nb_float)) {
        float_value = nb->nb_float(obj);
        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } 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 PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyList_New(0);
    dest = PyList_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyListObject*)src)->ob_item + start,
        ((PyListObject*)dest)->ob_item,
        length);
    return dest;
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyTuple_New(0);
    dest = PyTuple_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyTupleObject*)src)->ob_item + start,
        ((PyTupleObject*)dest)->ob_item,
        length);
    return dest;
}
#endif

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

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(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
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 int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
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, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 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* globals, 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;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = 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_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    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_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    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
#if PY_VERSION_HEX >= 0x030400a1
    0,                                  /*tp_finalize*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    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, 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 void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result)
        result = __Pyx_GetModuleGlobalName(name);
    return result;
}

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;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_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;
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
    {                                                                     \
        func_type value = func(x);                                        \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                PyErr_SetString(PyExc_OverflowError,                      \
                    (is_unsigned && unlikely(value < zero)) ?             \
                    "can't convert negative value to " #target_type :     \
                    "value too large to convert to " #target_type);       \
                return (target_type) -1;                                  \
            }                                                             \
        }                                                                 \
        return (target_type) value;                                       \
    }

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
    const char neg_one = (char) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(char) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
        } else {
            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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long) -1;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(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_GetAttr(ev, __pyx_n_s_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 = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, 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_GetAttr(yf, __pyx_n_s_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_GetAttr(yf, __pyx_n_s_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);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
            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 ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __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);
#if PY_VERSION_HEX < 0x030400a1
    /* 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_IN_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
#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 | Py_TPFLAGS_HAVE_FINALIZE, /* 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*/
#if PY_VERSION_HEX >= 0x030400a1
    0,                                  /*tp_del*/
#else
    __Pyx_Generator_del,                /*tp_del*/
#endif
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Generator_del,                /*tp_finalize*/
#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;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (__pyx_GeneratorType == NULL) {
        return -1;
    }
    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, (size_t)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 PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else /* PY_VERSION_HEX < 0x03030000 */
        if (PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
        return PyUnicode_AsUTF8AndSize(o, length);
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
#endif /* PY_VERSION_HEX < 0x03030000 */
    } else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_VERSION_HEX >= 0x02060000
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
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_MAJOR_VERSION < 3
  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_MAJOR_VERSION < 3
  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_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (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;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b)))
      return PyInt_AS_LONG(b);
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
     #if CYTHON_USE_PYLONG_INTERNALS
       switch (Py_SIZE(b)) {
       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
       case  0: return 0;
       case  1: return ((PyLongObject*)b)->ob_digit[0];
       }
     #endif
    #endif
  #if PY_VERSION_HEX < 0x02060000
    return PyInt_AsSsize_t(b);
  #else
    return PyLong_AsSsize_t(b);
  #endif
  }
  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
}


#endif /* Py_PYTHON_H */
