/* Generated by Cython 0.22 */

#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 < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_22"
#include <stddef.h>
#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 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#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_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
  #define Py_TPFLAGS_HAVE_NEWBUFFER 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)
  #define __Pyx_PyFrozenSet_Size(s)         PyObject_Size(s)
#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))
  #define __Pyx_PyFrozenSet_Size(s)         PySet_Size(s)
#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_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_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#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_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#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
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#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
#define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None)
#ifdef __cplusplus
template<typename T>
void __Pyx_call_destructor(T* x) {
    x->~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(T& ref) : ptr(&ref) { }
    T *operator->() { return ptr; }
    operator T&() { return *ptr; }
  private:
    T *ptr;
};
#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;

#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_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(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*) "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[] = {
  "cyvcf/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;
struct __pyx_opt_args_5cyvcf_6parser__map;
struct __pyx_opt_args_5cyvcf_6parser_6Reader__map;

/* "cyvcf/parser.pyx":45
 * UNKNOWN = 2
 * 
 * cdef inline list _map(func, list iterable, char *bad='.'):             # <<<<<<<<<<<<<<
 *     '''``map``, but make bad values None.'''
 *     return [func(x) if x != bad else None for x in iterable]
 */
struct __pyx_opt_args_5cyvcf_6parser__map {
  int __pyx_n;
  char *bad;
};

/* "cyvcf/parser.pyx":839
 * 
 * 
 *     cdef list _map(Reader self, func, iterable, char *bad='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None for x in iterable]
 */
struct __pyx_opt_args_5cyvcf_6parser_6Reader__map {
  int __pyx_n;
  char *bad;
};

/* "cyvcf/parser.pyx":125
 * 
 * 
 * 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":352
 * 
 * 
 * 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 *gt_phred_likelihoods;
  PyObject *CHROM;
  PyObject *ID;
  PyObject *FORMAT;
  PyObject *REF;
  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":719
 * 
 * 
 * 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
  struct __pyx_vtabstruct_5cyvcf_6parser_Reader *__pyx_vtab;
  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 *samp_data;
  PyObject *samples;
  PyObject *_tabix;
  PyObject *filename;
  int num_samples;
  struct __pyx_obj_5cyvcf_6parser__Record *curr_record;
};


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



/* "cyvcf/parser.pyx":719
 * 
 * 
 * cdef class Reader(object):             # <<<<<<<<<<<<<<
 * 
 *     """ Reader for a VCF v 4.1 file, an iterator returning ``_Record objects`` """
 */

struct __pyx_vtabstruct_5cyvcf_6parser_Reader {
  PyObject *(*_map)(struct __pyx_obj_5cyvcf_6parser_Reader *, PyObject *, PyObject *, struct __pyx_opt_args_5cyvcf_6parser_6Reader__map *__pyx_optional_args);
  PyObject *(*_parse_sample)(struct __pyx_obj_5cyvcf_6parser_Reader *, char *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5cyvcf_6parser_Reader *__pyx_vtabptr_5cyvcf_6parser_Reader;

/* --- Runtime support code (head) --- */
#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);
  #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
#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);

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

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

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#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);

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

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

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

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

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

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

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

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

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

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

#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_TypeTest(PyObject *obj, PyTypeObject *type);

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);
#endif

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

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

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

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);
#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 int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

#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 int __Pyx_SetVtable(PyObject *dict, void *vtable);

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;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __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);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

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

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

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

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

#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;
    PyObject *gi_name;
    PyObject *gi_qualname;
    int resume_label;
    char is_running;
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure, PyObject *name, PyObject *qualname);
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);

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static PyObject *__pyx_f_5cyvcf_6parser_6Reader__map(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, struct __pyx_opt_args_5cyvcf_6parser_6Reader__map *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5cyvcf_6parser_6Reader__parse_sample(CYTHON_UNUSED 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, int __pyx_skip_dispatch); /* 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;
static CYTHON_INLINE PyObject *__pyx_f_5cyvcf_6parser__map(PyObject *, PyObject *, struct __pyx_opt_args_5cyvcf_6parser__map *__pyx_optional_args); /*proto*/
#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_round;
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_8gt_bases___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_7gt_type___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_8gt_depth___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_12gt_ref_depth___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_20gt_phred_likelihoods___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_12gt_alt_depth___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_8gt_qual(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_14gt_copy_number___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_10is_variant(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_12is_het(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 int __pyx_pf_5cyvcf_6parser_5_Call_6sample_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_5_Call_6sample_4__del__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_4site___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_5_Call_4site_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_5_Call_4site_4__del__(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 int __pyx_pf_5cyvcf_6parser_5_Call_4data_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_5_Call_4data_4__del__(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 int __pyx_pf_5cyvcf_6parser_5_Call_6called_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_5_Call_6phased___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_5_Call_6phased_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value); /* 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, PyObject *__pyx_v_gt_phred_likelihoods, 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_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 PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7alleles___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_7alleles_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_7alleles_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_7samples_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_7samples_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_3ALT_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_3ALT_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_8gt_types_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_types_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals_4__del__(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 int __pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* 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_2ID___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_3REF___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_3REF_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_3REF_4__del__(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_4QUAL___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 int __pyx_pf_5cyvcf_6parser_7_Record_3POS_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_5start___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_5start_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_3end___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_3end_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_7num_het___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_7num_het_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_11num_unknown___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_11num_unknown_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_10num_called___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_10num_called_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_4INFO___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_4INFO_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_7_Record_4INFO_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_15_sample_indexes___get__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_7_Record_13has_genotypes___get__(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_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_parse_info(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_info_str); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_12_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_14_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_16__next__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_18_update_genotype_info(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_var, PyObject *__pyx_v_sample_info); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_20parse(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_set_self); /* 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_6Reader_8metadata___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_8metadata_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_8metadata_4__del__(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 int __pyx_pf_5cyvcf_6parser_6Reader_5infos_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_5infos_4__del__(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 int __pyx_pf_5cyvcf_6parser_6Reader_7filters_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_7filters_4__del__(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 int __pyx_pf_5cyvcf_6parser_6Reader_7formats_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_7formats_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_15_sample_indexes___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 int __pyx_pf_5cyvcf_6parser_6Reader_7samples_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_7samples_4__del__(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 int __pyx_pf_5cyvcf_6parser_6Reader_8filename_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_8filename_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_11curr_record___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_11curr_record_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5cyvcf_6parser_6Reader_11curr_record_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self); /* 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_[] = ".";
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_PL[] = "PL";
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__18[] = "|";
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__51[] = ".|.";
static char __pyx_k_aaf[] = "aaf";
static char __pyx_k_alt[] = "alt";
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_var[] = "var";
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_parse[] = "parse";
static char __pyx_k_pysam[] = "pysam";
static char __pyx_k_range[] = "range";
static char __pyx_k_round[] = "round";
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_set_self[] = "set_self";
static char __pyx_k_template[] = "template";
static char __pyx_k_var_type[] = "var_type";
static char __pyx_k_writerow[] = "writerow";
static char __pyx_k_Character[] = "Character";
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_pyx_vtable[] = "__pyx_vtable__";
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_sample_info[] = "sample_info";
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_gt_phred_likelihoods[] = "gt_phred_likelihoods";
static char __pyx_k_update_genotype_info[] = "_update_genotype_info";
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_format_sample_locals_genexpr[] = "_format_sample.<locals>.genexpr";
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+|\\.|[ARG]),\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+|\\.|[ARG]),\n            Type=(?P<type>Integer|Float|Flag|Character|String),\n            Description=\"(?P<desc>[^\"]*)\"\n            >";
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_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_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_Writer__format_sample_locals_gen[] = "Writer._format_sample.<locals>.genexpr";
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,                                                     gt_phred_likelihoods,                                                     num_hom_ref, num_het,                                                     num_hom_alt, num_unknown,                                                     num_called";
static PyObject *__pyx_kp_b_;
static PyObject *__pyx_kp_s_;
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_b_Character;
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_PL;
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__format_sample_locals_gen;
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__18;
static PyObject *__pyx_kp_b__20;
static PyObject *__pyx_kp_s__20;
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__51;
static PyObject *__pyx_n_s_aaf;
static PyObject *__pyx_n_s_alt;
static PyObject *__pyx_n_s_args;
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_sample_locals_genexpr;
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_phred_likelihoods;
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;
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_pyx_vtable;
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_round;
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_sample_info;
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_set_self;
static PyObject *__pyx_n_s_site;
static PyObject *__pyx_n_s_snp;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_stderr;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_n_s_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_genotype_info;
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;
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_int_neg_10;
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__58;
static PyObject *__pyx_slice__59;
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__17;
static PyObject *__pyx_tuple__19;
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__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__52;
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__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__92;

/* "cyvcf/parser.pyx":45
 * UNKNOWN = 2
 * 
 * cdef inline list _map(func, list iterable, char *bad='.'):             # <<<<<<<<<<<<<<
 *     '''``map``, but make bad values None.'''
 *     return [func(x) if x != bad else None for x in iterable]
 */

static CYTHON_INLINE PyObject *__pyx_f_5cyvcf_6parser__map(PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, struct __pyx_opt_args_5cyvcf_6parser__map *__pyx_optional_args) {
  char *__pyx_v_bad = ((char *)__pyx_k_);
  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 = NULL;
  int __pyx_t_6;
  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_RefNannySetupContext("_map", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_bad = __pyx_optional_args->bad;
    }
  }

  /* "cyvcf/parser.pyx":47
 * cdef inline list _map(func, list iterable, char *bad='.'):
 *     '''``map``, but make bad values None.'''
 *     return [func(x) if x != bad else None for x in iterable]             # <<<<<<<<<<<<<<
 * 
 * class _vcf_metadata_parser(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_iterable == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __pyx_v_iterable; __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 = 47; __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 = 47; __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_PyBytes_FromString(__pyx_v_bad); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_x, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {
      __Pyx_INCREF(__pyx_v_func);
      __pyx_t_7 = __pyx_v_func; __pyx_t_8 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_8) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_x); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF(Py_None);
      __pyx_t_4 = Py_None;
    }
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __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_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":45
 * UNKNOWN = 2
 * 
 * cdef inline list _map(func, list iterable, char *bad='.'):             # <<<<<<<<<<<<<<
 *     '''``map``, but make bad values None.'''
 *     return [func(x) if x != bad else None for x in iterable]
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cyvcf.parser._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":51
 * 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__ = {"__init__", (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_1__init__, METH_O, 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;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cyvcf/parser.pyx":52
 *     '''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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_vcf_metadata_parser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __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 = 52; __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_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __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_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __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":53
 *     def __init__(self):
 *         super(_vcf_metadata_parser, self).__init__()
 *         self.info_pattern = re.compile(r'''\#\#INFO=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Number=(?P<number>-?\d+|\.|[ARG]),
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":58
 *             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_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_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VERBOSE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_3) {
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_INFO_ID_P_id_Number_P_number_d);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __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_6, 1+__pyx_t_5, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

  /* "cyvcf/parser.pyx":59
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)
 *         self.filter_pattern = re.compile(r'''\#\#FILTER=<             # <<<<<<<<<<<<<<
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 */
  __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_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":62
 *             ID=(?P<id>[^,]+),
 *             Description="(?P<desc>[^"]*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.format_pattern = re.compile(r'''\#\#FORMAT=<
 *             ID=(?P<id>.+),
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_VERBOSE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_3 = PyTuple_New(2+__pyx_t_5); 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);
  if (__pyx_t_2) {
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_FILTER_ID_P_id_Description_P_de);
  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __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_5, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, 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_6); __pyx_t_6 = 0;

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

  /* "cyvcf/parser.pyx":68
 *             Type=(?P<type>.+),
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)             # <<<<<<<<<<<<<<
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')
 * 
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_VERBOSE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (__pyx_t_6) {
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(__pyx_kp_s_FORMAT_ID_P_id_Number_P_number);
  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __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_5, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 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 = 63; __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;

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

  /* "cyvcf/parser.pyx":69
 *             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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); 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_1); __pyx_t_1 = 0;
  __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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_meta_pattern, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":51
 * 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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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":71
 *         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 = {"read_info", (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_3read_info, METH_VARARGS|METH_KEYWORDS, __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 = 71; __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 = 71; __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 = 71; __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;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __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;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_info", 0);

  /* "cyvcf/parser.pyx":73
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info_pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_info_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_info_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_info_string);
    __Pyx_GIVEREF(__pyx_v_info_string);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __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_3); __pyx_t_3 = 0;
  __pyx_v_match = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":74
 *         '''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_5 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

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

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

  /* "cyvcf/parser.pyx":78
 *                 "One of the INFO lines is malformed: %s" % info_string)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             num = int(match.group('number'))
 *             if num < 0:
 */
  {
    __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":79
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
      __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 = 79; __pyx_clineno = __LINE__; goto __pyx_L4_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 = 79; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_num = __pyx_t_1;
      __pyx_t_1 = 0;

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

        /* "cyvcf/parser.pyx":81
 *             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_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_L11_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

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

      /* "cyvcf/parser.pyx":83
 *                 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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_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_L5_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_L11_try_end:;
  }

  /* "cyvcf/parser.pyx":85
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __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 = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":86
 * 
 *         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 = 86; __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 = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __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 = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_13 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_13 = 1;
    }
  }
  __pyx_t_14 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_1) {
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_num);
  __Pyx_GIVEREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_13, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  __pyx_t_2 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_info = __pyx_t_4;
  __pyx_t_4 = 0;

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

  /* "cyvcf/parser.pyx":71
 *         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_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __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":90
 *         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 = {"read_filter", (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_5read_filter, METH_VARARGS|METH_KEYWORDS, __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 = 90; __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 = 90; __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 = 90; __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;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_filter", 0);

  /* "cyvcf/parser.pyx":92
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter_pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_filter_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_filter_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_filter_string);
    __Pyx_GIVEREF(__pyx_v_filter_string);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_match = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":93
 *         '''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_5 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "cyvcf/parser.pyx":95
 *         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_1 = __Pyx_PyString_Format(__pyx_kp_s_One_of_the_FILTER_lines_is_malfo, __pyx_v_filter_string); 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);

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

  /* "cyvcf/parser.pyx":97
 *                 "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 = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_4) {
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_2 = 0;
  __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_filt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":99
 *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); 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_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, 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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); 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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_filt);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_filt);
  __Pyx_GIVEREF(__pyx_v_filt);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":90
 *         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_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":101
 *         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 = {"read_format", (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_7read_format, METH_VARARGS|METH_KEYWORDS, __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 = 101; __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 = 101; __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 = 101; __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;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __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;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_format", 0);

  /* "cyvcf/parser.pyx":103
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_format_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_format_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_format_string);
    __Pyx_GIVEREF(__pyx_v_format_string);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __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_3); __pyx_t_3 = 0;
  __pyx_v_match = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":104
 *         '''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_5 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

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

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

  /* "cyvcf/parser.pyx":108
 *                 "One of the FORMAT lines is malformed: %s" % format_string)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             num = int(match.group('number'))
 *             if num < 0:
 */
  {
    __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":109
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
      __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 = 109; __pyx_clineno = __LINE__; goto __pyx_L4_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 = 109; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_num = __pyx_t_1;
      __pyx_t_1 = 0;

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

        /* "cyvcf/parser.pyx":111
 *             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_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_L11_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

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

      /* "cyvcf/parser.pyx":113
 *                 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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_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_L5_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_L11_try_end:;
  }

  /* "cyvcf/parser.pyx":115
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __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 = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":116
 * 
 *         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 = 116; __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 = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __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 = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_13 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_13 = 1;
    }
  }
  __pyx_t_14 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_1) {
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_num);
  __Pyx_GIVEREF(__pyx_v_num);
  PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_13, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  __pyx_t_2 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_form = __pyx_t_4;
  __pyx_t_4 = 0;

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

  /* "cyvcf/parser.pyx":101
 *         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_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __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":120
 *         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 = {"read_meta", (PyCFunction)__pyx_pw_5cyvcf_6parser_20_vcf_metadata_parser_9read_meta, METH_VARARGS|METH_KEYWORDS, 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 = 120; __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 = 120; __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 = 120; __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;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_meta", 0);

  /* "cyvcf/parser.pyx":121
 * 
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)             # <<<<<<<<<<<<<<
 *         return match.group('key'), match.group('val')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_meta_pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_meta_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_meta_string);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_meta_string);
    __Pyx_GIVEREF(__pyx_v_meta_string);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __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_3); __pyx_t_3 = 0;
  __pyx_v_match = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":122
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __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_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __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);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":120
 *         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_XDECREF(__pyx_t_4);
  __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":136
 *     cdef public 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 = 136; __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 = 136; __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 = 136; __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 = 136; __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 = 136; __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 = 136; __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 = 136; __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;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cyvcf/parser.pyx":138
 *     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":140
 *         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 = 140; __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":142
 *         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":144
 *         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 = 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);
  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 = 144; __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":146
 *         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":148
 *         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_3 = (__pyx_v_self->gt_nums != ((PyObject*)Py_None));
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __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 = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":149
 *         # 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":151
 *             self.phased = 1
 *         else:
 *             self.phased = 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    __pyx_v_self->phased = 0;
  }
  __pyx_L3:;

  /* "cyvcf/parser.pyx":136
 *     cdef public 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_5);
  __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":153
 *             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":154
 * 
 *     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 = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->data, __pyx_n_s_GQ, __pyx_kp_s__20); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __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 = 154; __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 = 154; __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":153
 *             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":156
 *         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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "cyvcf/parser.pyx":161
 *         """
 *         # < 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":162
 *         # < 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":163
 *         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_site); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "cyvcf/parser.pyx":162
 *         # < 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_site); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_bool_binop_done;
    }

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

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

  /* "cyvcf/parser.pyx":156
 *         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_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":166
 *                     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":168
 *     def __getitem__(self, key):
 *         """ Lookup value, backwards compatibility """
 *         return self.data[key]             # <<<<<<<<<<<<<<
 * 
 *     property gt_bases:
 */
  __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 = 168; __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 = 168; __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":166
 *                     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":171
 * 
 *     property gt_bases:
 *         def __get__(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_8gt_bases_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_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_5_Call_8gt_bases___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_8gt_bases___get__(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;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":176
 *             '''
 *             # 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":178
 *             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__21);
      __pyx_t_2 = __pyx_kp_s__21;
    } else {
      __Pyx_INCREF(__pyx_kp_s__18);
      __pyx_t_2 = __pyx_kp_s__18;
    }
    __pyx_v_phase_char = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":179
 *                 # 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->gt_nums, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_phase_char); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __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_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_phase_char);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_phase_char);
      __Pyx_GIVEREF(__pyx_v_phase_char);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_alleles = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":181
 *                 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_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":182
 *                 # 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_phase_char, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "cyvcf/parser.pyx":183
 *                 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 (likely(PyList_CheckExact(__pyx_v_alleles)) || PyTuple_CheckExact(__pyx_v_alleles)) {
          __pyx_t_4 = __pyx_v_alleles; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_alleles); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        }
        for (;;) {
          if (likely(!__pyx_t_10)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              #else
              __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              #endif
            } else {
              if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              #else
              __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              #endif
            }
          } else {
            __pyx_t_11 = __pyx_t_10(__pyx_t_4);
            if (unlikely(!__pyx_t_11)) {
              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 = 183; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_11);
          __pyx_t_11 = 0;

          /* "cyvcf/parser.pyx":182
 *                 # 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_, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __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 = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            }
            __pyx_t_12 = PyNumber_Int(__pyx_v_a); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = PyObject_GetItem(__pyx_v_self->site->alleles, __pyx_t_12); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_11 = __pyx_t_13;
            __pyx_t_13 = 0;
          } else {
            __Pyx_INCREF(__pyx_kp_s_);
            __pyx_t_11 = __pyx_kp_s_;
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "cyvcf/parser.pyx":183
 *                 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")
 */
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (!__pyx_t_4) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else {
          __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
          PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L8_try_return;
      }
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cyvcf/parser.pyx":184
 *                     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_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_14) {
        __Pyx_AddTraceback("cyvcf.parser._Call.gt_bases.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_11);

        /* "cyvcf/parser.pyx":185
 *                                             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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stderr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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_L8_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_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);
    }
    goto __pyx_L3;
  }
  /*else*/ {

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

  /* "cyvcf/parser.pyx":171
 * 
 *     property gt_bases:
 *         def __get__(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_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_bases.__get__", __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":191
 *     property gt_type:
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             '''The type of genotype.
 *                0 / 00000000 hom ref
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_7gt_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_7gt_type_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_7gt_type___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_7gt_type___get__(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_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;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":203
 *             '''
 *             # 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":204
 *             # 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":206
 *             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__21);
      __pyx_t_2 = __pyx_kp_s__21;
    } else {
      __Pyx_INCREF(__pyx_kp_s__18);
      __pyx_t_2 = __pyx_kp_s__18;
    }
    __pyx_v_phase_char = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":207
 *                 # grab the numeric alleles of the gt string; tokenize by phasing
 *                 phase_char = '/' if not self.phased else '|'
 *                 alleles = self.gt_nums.split(phase_char)             # <<<<<<<<<<<<<<
 * 
 *                 if len(alleles) == 2:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->gt_nums, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_phase_char); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __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_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_phase_char);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_phase_char);
      __Pyx_GIVEREF(__pyx_v_phase_char);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_alleles = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":209
 *                 alleles = self.gt_nums.split(phase_char)
 * 
 *                 if len(alleles) == 2:             # <<<<<<<<<<<<<<
 *                     if alleles[0] == alleles[1]:
 *                         if alleles[0] == "0":
 */
    __pyx_t_6 = PyObject_Length(__pyx_v_alleles); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = ((__pyx_t_6 == 2) != 0);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":210
 * 
 *                 if len(alleles) == 2:
 *                     if alleles[0] == alleles[1]:             # <<<<<<<<<<<<<<
 *                         if alleles[0] == "0":
 *                             gt_type = HOM_REF
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_alleles, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_alleles, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __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_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_1) {

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

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

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

        /* "cyvcf/parser.pyx":216
 *                             gt_type = HOM_ALT
 *                     else:
 *                         gt_type = HET             # <<<<<<<<<<<<<<
 *                 elif len(alleles) == 1:
 *                     if alleles[0] == "0":
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_HET); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_gt_type, __pyx_t_5);
        __pyx_t_5 = 0;
      }
      __pyx_L5:;
      goto __pyx_L4;
    }

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

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

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

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

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

  /* "cyvcf/parser.pyx":191
 *     property gt_type:
 * 
 *         def __get__(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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_type.__get__", __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_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":226
 * 
 *     property gt_depth:
 *         def __get__(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_8gt_depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_8gt_depth_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_8gt_depth___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_8gt_depth___get__(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("__get__", 0);

  /* "cyvcf/parser.pyx":231
 *             '''
 *             # 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":232
 *             # 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 = 232; __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 = 232; __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":233
 *             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":234
 *                 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":236
 *                     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_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":237
 *                 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.__get__", __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 = 237; __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":238
 *                     return -1
 *             except KeyError:
 *                 return -1             # <<<<<<<<<<<<<<
 * 
 *     property gt_ref_depth:
 */
      __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;
    }
    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;
  }

  /* "cyvcf/parser.pyx":226
 * 
 *     property gt_depth:
 *         def __get__(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.__get__", __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":241
 * 
 *     property gt_ref_depth:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             '''The depth of aligned sequences that supported the
 *             reference allele for this sample.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_12gt_ref_depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_12gt_ref_depth_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_12gt_ref_depth___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_12gt_ref_depth___get__(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;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":246
 *             '''
 *             # 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 = 246; __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 = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":247
 *             # 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 = 247; __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 = 247; __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":248
 *             if 'AD' in self.data:
 *                 depths = self.data['AD']
 *                 if depths is not None:             # <<<<<<<<<<<<<<
 *                     # require bi-allelic
 *                     if isinstance(depths, (list, tuple)) and 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":250
 *                 if depths is not None:
 *                     # require bi-allelic
 *                     if isinstance(depths, (list, tuple)) and len(depths) == 2:             # <<<<<<<<<<<<<<
 *                         return depths[0]
 *                     else:
 */
      __pyx_t_4 = PyList_Check(__pyx_v_depths); 
      __pyx_t_5 = (__pyx_t_4 != 0);
      if (!__pyx_t_5) {
      } else {
        __pyx_t_2 = __pyx_t_5;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_5 = PyTuple_Check(__pyx_v_depths); 
      __pyx_t_4 = (__pyx_t_5 != 0);
      __pyx_t_2 = __pyx_t_4;
      __pyx_L8_bool_binop_done:;
      __pyx_t_4 = (__pyx_t_2 != 0);
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = PyObject_Length(__pyx_v_depths); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = ((__pyx_t_6 == 2) != 0);
      __pyx_t_1 = __pyx_t_4;
      __pyx_L6_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cyvcf/parser.pyx":251
 *                     # require bi-allelic
 *                     if isinstance(depths, (list, tuple)) and len(depths) == 2:
 *                         return depths[0]             # <<<<<<<<<<<<<<
 *                     else:
 *                         # ref allele is first
 */
        __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 = 251; __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":254
 *                     else:
 *                         # ref allele is first
 *                         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":256
 *                         return -1
 *                 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":257
 *                 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 = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_RO, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":258
 *                     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 = 258; __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 = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__pyx_t_4 != 0);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":259
 *             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 = 259; __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 = 259; __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":261
 *                     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":263
 *                     return -1
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 * 
 *     property gt_phred_likelihoods:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":241
 * 
 *     property gt_ref_depth:
 *         def __get__(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.__get__", __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":266
 * 
 *     property gt_phred_likelihoods:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if 'PL' in self.data:
 *                 return self.data['PL']
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_20gt_phred_likelihoods_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_20gt_phred_likelihoods_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_20gt_phred_likelihoods___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_20gt_phred_likelihoods___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_g = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":267
 *     property gt_phred_likelihoods:
 *         def __get__(self):
 *             if 'PL' in self.data:             # <<<<<<<<<<<<<<
 *                 return self.data['PL']
 *                 # phred-scaled.
 */
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_PL, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":268
 *         def __get__(self):
 *             if 'PL' in self.data:
 *                 return self.data['PL']             # <<<<<<<<<<<<<<
 *                 # phred-scaled.
 *             elif 'GL' in self.data and self.data['GL'] is not None:
 */
    __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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_PL); 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;
  }

  /* "cyvcf/parser.pyx":270
 *                 return self.data['PL']
 *                 # phred-scaled.
 *             elif 'GL' in self.data and self.data['GL'] is not None:             # <<<<<<<<<<<<<<
 *                 return [int(round(-10 * g)) if g is not None else None for g in self.data['GL']]
 *             else:
 */
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_GL, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_GL); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":271
 *                 # phred-scaled.
 *             elif 'GL' in self.data and self.data['GL'] is not None:
 *                 return [int(round(-10 * g)) if g is not None else None for g in self.data['GL']]             # <<<<<<<<<<<<<<
 *             else:
 *                 return []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__pyx_v_self->data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_GL); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_8(__pyx_t_6);
        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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_2 = (__pyx_v_g != Py_None);
      if ((__pyx_t_2 != 0)) {
        __pyx_t_9 = PyNumber_Multiply(__pyx_int_neg_10, __pyx_v_g); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_5 = __pyx_t_10;
        __pyx_t_10 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_5 = Py_None;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":273
 *                 return [int(round(-10 * g)) if g is not None else None for g in self.data['GL']]
 *             else:
 *                 return []             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__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;
  }

  /* "cyvcf/parser.pyx":266
 * 
 *     property gt_phred_likelihoods:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if 'PL' in self.data:
 *                 return self.data['PL']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_phred_likelihoods.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_g);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_12gt_alt_depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_12gt_alt_depth_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_12gt_alt_depth___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_12gt_alt_depth___get__(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;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":284
 * 
 *             # 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 = 284; __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 = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":285
 *             # 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 = 285; __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 = 285; __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":286
 *             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":288
 *                 if depths is not None:
 *                     # require bi-allelic
 *                     if not isinstance(depths, (list, tuple)) or len(depths) != 2:             # <<<<<<<<<<<<<<
 *                         return -1
 *                     else:
 */
      __pyx_t_4 = PyList_Check(__pyx_v_depths); 
      __pyx_t_5 = (__pyx_t_4 != 0);
      if (!__pyx_t_5) {
      } else {
        __pyx_t_2 = __pyx_t_5;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_5 = PyTuple_Check(__pyx_v_depths); 
      __pyx_t_4 = (__pyx_t_5 != 0);
      __pyx_t_2 = __pyx_t_4;
      __pyx_L8_bool_binop_done:;
      __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
      if (!__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = PyObject_Length(__pyx_v_depths); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = ((__pyx_t_6 != 2) != 0);
      __pyx_t_1 = __pyx_t_4;
      __pyx_L6_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cyvcf/parser.pyx":289
 *                     # 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":292
 *                     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 = 292; __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":294
 *                         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":296
 *                     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 = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_AO, __pyx_v_self->data, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":297
 *             # 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 = 297; __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 = 297; __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":298
 *             elif 'AO' in self.data:
 *                 depth = self.data['AO']
 *                 if depth is not None:             # <<<<<<<<<<<<<<
 *                     # require bi-allelic
 *                     if isinstance(depth, list):
 */
    __pyx_t_4 = (__pyx_v_depth != Py_None);
    __pyx_t_1 = (__pyx_t_4 != 0);
    if (__pyx_t_1) {

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

        /* "cyvcf/parser.pyx":301
 *                     # 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":303
 *                         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":305
 *                         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":307
 *                     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":277
 * 
 *     property gt_alt_depth:
 *         def __get__(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.__get__", __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":310
 * 
 *     @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_9gt_qual(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_8gt_qual[] = "The PHRED-scaled quality of genotype\n        call for this sample.\n        ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_9gt_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_8gt_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_8gt_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":315
 *         '''
 *         # 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":316
 *         # 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 = 316; __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 = 316; __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":317
 *         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":318
 *             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":320
 *                 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_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":321
 *             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 = 321; __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":322
 *                 return -1
 *         except KeyError:
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *     property gt_copy_number:
 */
      __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;
    }
    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;
  }

  /* "cyvcf/parser.pyx":310
 * 
 *     @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":325
 * 
 *     property gt_copy_number:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             '''The copy number prediction for this sample.
 *             '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_14gt_copy_number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_14gt_copy_number_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_14gt_copy_number___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_14gt_copy_number___get__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  PyObject *__pyx_v_qual = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cyvcf/parser.pyx":329
 *             '''
 *             # extract the numeric alleles of the gt string
 *             if not 'CN' in self.data:             # <<<<<<<<<<<<<<
 *                 return -1
 *             qual = self.data['CN']
 */
  if (unlikely(__pyx_v_self->data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_CN, __pyx_v_self->data, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":330
 *             # extract the numeric alleles of the gt string
 *             if not 'CN' in self.data:
 *                 return -1             # <<<<<<<<<<<<<<
 *             qual = self.data['CN']
 *             if qual 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":331
 *             if not 'CN' in self.data:
 *                 return -1
 *             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 = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->data, __pyx_n_s_CN); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_qual = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":332
 *                 return -1
 *             qual = self.data['CN']
 *             if qual is not None:             # <<<<<<<<<<<<<<
 *                 return qual
 *             else:
 */
  __pyx_t_2 = (__pyx_v_qual != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

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

    /* "cyvcf/parser.pyx":335
 *                 return qual
 *             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":325
 * 
 *     property gt_copy_number:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             '''The copy number prediction for this sample.
 *             '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cyvcf.parser._Call.gt_copy_number.__get__", __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":338
 * 
 *     @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_11is_variant(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_10is_variant[] = " Return True if not a reference call ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_11is_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_10is_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_10is_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":340
 *     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":341
 *         """ 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":342
 *         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 = 342; __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 = 342; __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 = 342; __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":338
 * 
 *     @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":345
 * 
 *     @property
 *     def is_het(self):             # <<<<<<<<<<<<<<
 *         """ Return True for heterozygous calls """
 *         if not self.called:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_13is_het(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5cyvcf_6parser_5_Call_12is_het[] = " Return True for heterozygous calls ";
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_13is_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_12is_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_12is_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":347
 *     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":348
 *         """ 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":349
 *         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 = 349; __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 = 349; __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 = 349; __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":345
 * 
 *     @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":128
 *     """ A genotype call, a cell entry in a VCF file"""
 * 
 *     cdef public bytes sample   #NA12878             # <<<<<<<<<<<<<<
 *     cdef bytes gt_nums  #'0/1'
 *     # use bytes instead of char * because of C -> Python string complications
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_6sample_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_6sample_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6sample_2__set__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_6sample_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__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;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_6sample_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_6sample_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6sample_4__del__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_6sample_4__del__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->sample);
  __Pyx_DECREF(__pyx_v_self->sample);
  __pyx_v_self->sample = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":132
 *     # use bytes instead of char * because of C -> Python string complications
 *     # see: http://docs.cython.org/src/tutorial/strings.html
 *     cdef public _Record site   #instance of _Record             # <<<<<<<<<<<<<<
 *     cdef public dict data
 *     cdef public bint called, phased
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_4site_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_4site_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4site_2__set__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_4site_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5cyvcf_6parser__Record))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->site);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->site));
  __pyx_v_self->site = ((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_4site_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_4site_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4site_4__del__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_4site_4__del__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->site);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->site));
  __pyx_v_self->site = ((struct __pyx_obj_5cyvcf_6parser__Record *)Py_None);

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

/* "cyvcf/parser.pyx":133
 *     # see: http://docs.cython.org/src/tutorial/strings.html
 *     cdef public _Record site   #instance of _Record
 *     cdef public dict data             # <<<<<<<<<<<<<<
 *     cdef public bint called, 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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4data_2__set__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_4data_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->data);
  __Pyx_DECREF(__pyx_v_self->data);
  __pyx_v_self->data = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_4data_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_4data_4__del__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_4data_4__del__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->data);
  __Pyx_DECREF(__pyx_v_self->data);
  __pyx_v_self->data = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":134
 *     cdef public _Record site   #instance of _Record
 *     cdef public dict data
 *     cdef public bint called, phased             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, _Record site, char *sample, dict 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 = 134; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_6called_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_6called_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6called_2__set__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_6called_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->called = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_5_Call_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 = 134; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_5_Call_6phased_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_5_Call_6phased_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_5_Call_6phased_2__set__(((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_5_Call_6phased_2__set__(struct __pyx_obj_5cyvcf_6parser__Call *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->phased = __pyx_t_1;

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

/* "cyvcf/parser.pyx":378
 *     cdef readonly 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;
  PyObject *__pyx_v_gt_phred_likelihoods = 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_gt_phred_likelihoods,&__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[25] = {0,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":379
 * 
 *     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":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,
 *                         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":381
 *                         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":382
 *                         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":383
 *                         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,
 */
    values[13] = ((PyObject*)Py_None);
    values[14] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":384
 *                         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,
 *                         list gt_phred_likelihoods=None,
 */
    values[15] = ((PyObject*)Py_None);
    values[16] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":385
 *                         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,             # <<<<<<<<<<<<<<
 *                         list gt_phred_likelihoods=None,
 *                         int num_hom_ref=0,
 */
    values[17] = ((PyObject*)Py_None);
    values[18] = ((PyObject*)Py_None);

    /* "cyvcf/parser.pyx":386
 *                         list gt_ref_depths=None, list gt_alt_depths=None,
 *                         list gt_quals=None, list gt_copy_numbers=None,
 *                         list gt_phred_likelihoods=None,             # <<<<<<<<<<<<<<
 *                         int num_hom_ref=0,
 *                         int num_het=0, int num_hom_alt=0,
 */
    values[19] = ((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 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
        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, 25, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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, 25, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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, 25, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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, 25, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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_gt_phred_likelihoods);
          if (value) { values[19] = value; kw_args--; }
        }
        case 20:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_hom_ref);
          if (value) { values[20] = value; kw_args--; }
        }
        case 21:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_het);
          if (value) { values[21] = value; kw_args--; }
        }
        case 22:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_hom_alt);
          if (value) { values[22] = value; kw_args--; }
        }
        case 23:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_unknown);
          if (value) { values[23] = value; kw_args--; }
        }
        case 24:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_called);
          if (value) { values[24] = 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 = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
        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 = 378; __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 = 378; __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 = 378; __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 = 379; __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]);
    __pyx_v_gt_phred_likelihoods = ((PyObject*)values[19]);
    if (values[20]) {
      __pyx_v_num_hom_ref = __Pyx_PyInt_As_int(values[20]); if (unlikely((__pyx_v_num_hom_ref == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_hom_ref = ((int)0);
    }
    if (values[21]) {
      __pyx_v_num_het = __Pyx_PyInt_As_int(values[21]); if (unlikely((__pyx_v_num_het == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_het = ((int)0);
    }
    if (values[22]) {
      __pyx_v_num_hom_alt = __Pyx_PyInt_As_int(values[22]); if (unlikely((__pyx_v_num_hom_alt == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_hom_alt = ((int)0);
    }
    if (values[23]) {
      __pyx_v_num_unknown = __Pyx_PyInt_As_int(values[23]); if (unlikely((__pyx_v_num_unknown == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_num_unknown = ((int)0);
    }
    if (values[24]) {
      __pyx_v_num_called = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_num_called == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __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, 25, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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 = 379; __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 = 380; __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 = 381; __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 = 381; __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 = 382; __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 = 382; __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 = 383; __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 = 383; __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 = 384; __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 = 384; __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 = 385; __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 = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt_phred_likelihoods), (&PyList_Type), 1, "gt_phred_likelihoods", 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_gt_phred_likelihoods, __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":378
 *     cdef readonly 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, PyObject *__pyx_v_gt_phred_likelihoods, 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":391
 *                         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 = 391; __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":392
 *         # 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":393
 *         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 = 393; __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":394
 *         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 = 394; __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 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":395
 *         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":396
 *         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":397
 *         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":398
 *         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":399
 *         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 = 399; __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":401
 *         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":402
 *         # 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);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __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":403
 *         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 = 403; __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 = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":404
 *         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 = 404; __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 = 404; __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 = 404; __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":406
 *              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);
    __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __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":407
 *         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 = 407; __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":408
 *              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 = 408; __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 = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":409
 *         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":410
 *         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":411
 *         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":412
 *         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":413
 *         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":414
 *         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":415
 *         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":416
 *         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":417
 *         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.gt_phred_likelihoods = gt_phred_likelihoods
 */
  __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":418
 *         self.gt_alt_depths = gt_alt_depths
 *         self.gt_quals = gt_quals
 *         self.gt_copy_numbers = gt_copy_numbers             # <<<<<<<<<<<<<<
 *         self.gt_phred_likelihoods = gt_phred_likelihoods
 *         self.num_hom_ref = num_hom_ref
 */
  __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":419
 *         self.gt_quals = gt_quals
 *         self.gt_copy_numbers = gt_copy_numbers
 *         self.gt_phred_likelihoods = gt_phred_likelihoods             # <<<<<<<<<<<<<<
 *         self.num_hom_ref = num_hom_ref
 *         self.num_het = num_het
 */
  __Pyx_INCREF(__pyx_v_gt_phred_likelihoods);
  __Pyx_GIVEREF(__pyx_v_gt_phred_likelihoods);
  __Pyx_GOTREF(__pyx_v_self->gt_phred_likelihoods);
  __Pyx_DECREF(__pyx_v_self->gt_phred_likelihoods);
  __pyx_v_self->gt_phred_likelihoods = __pyx_v_gt_phred_likelihoods;

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

    /* "cyvcf/parser.pyx":426
 *         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":428
 *             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":378
 *     cdef readonly 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":430
 *             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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "cyvcf/parser.pyx":434
 * 
 *         # < 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":435
 *         # < 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_CHROM); 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_CHROM); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); 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_5); __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_bool_binop_done;
    }

    /* "cyvcf/parser.pyx":436
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_POS); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_POS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L4_bool_binop_done;
    }

    /* "cyvcf/parser.pyx":437
 *             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_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_REF); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_bool_binop_done;
    }

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

  /* "cyvcf/parser.pyx":430
 *             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_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":440
 *                     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":441
 * 
 *     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 = 441; __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":440
 *                     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":443
 *         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":444
 * 
 *     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 = 444; __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 = 444; __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 = 444; __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 = 444; __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 = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_5) {
    } else {
      __Pyx_INCREF(__pyx_v_x);
      __pyx_t_4 = __pyx_v_x;
      goto __pyx_L5_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_kp_s_);
    __pyx_t_4 = __pyx_kp_s_;
    __pyx_L5_bool_binop_done:;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __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 = 444; __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":443
 *         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":446
 *         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":447
 * 
 *     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 = 447; __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 = 447; __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":446
 *         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":449
 *         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":450
 * 
 *     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 = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":451
 *     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_);
    __pyx_r = __pyx_kp_s_;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":452
 *         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 = 452; __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 = 452; __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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(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 = 452; __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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 452; __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 = 452; __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 = 452; __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 = 452; __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 = 452; __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 = 452; __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 = 452; __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 = 452; __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 = 452; __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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stringify); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_y); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_y);
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_y);
      __Pyx_GIVEREF(__pyx_v_y);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 452; __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_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 452; __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":449
 *         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":454
 *         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":457
 *         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, __pyx_n_s_genexpr, __pyx_n_s_format_sample_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cyvcf.parser._Record._format_sample.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = 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 = 457; __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 = 457; __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 = 457; __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 = 457; __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)) || 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 = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(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 = 457; __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 = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 457; __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 = 457; __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 = 457; __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 = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s_stringify); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample)) { __Pyx_RaiseClosureNameError("sample"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 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 = 457; __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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":454
 *         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":455
 * 
 *     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 = 455; __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 = 455; __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":456
 *     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":457
 *         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 = 457; __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 = 457; __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":454
 *         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":459
 *         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_);
    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 = 459; __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 = 459; __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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_stringify", 0);

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

    /* "cyvcf/parser.pyx":461
 *     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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(__pyx_v_none);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_none);
    __Pyx_GIVEREF(__pyx_v_none);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __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":462
 *         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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 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":459
 *         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_XDECREF(__pyx_t_6);
  __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":464
 *         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_);
    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 = 464; __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 = 464; __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 = 464; __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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_map", 0);

  /* "cyvcf/parser.pyx":466
 *     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 = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":467
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  if (likely(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 = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(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 = 467; __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 = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 467; __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 = 467; __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 = 467; __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":466
 *     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_INCREF(__pyx_v_func);
      __pyx_t_8 = __pyx_v_func; __pyx_t_9 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_9) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_x); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_5 = __pyx_t_7;
      __pyx_t_7 = 0;
    } else {

      /* "cyvcf/parser.pyx":467
 *         '''``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 = 466; __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":464
 *         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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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":469
 *                 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;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cyvcf/parser.pyx":470
 * 
 *     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":471
 *     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 = 471; __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 = 471; __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 = 471; __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 = 471; __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 = 471; __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 = 471; __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 = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_alt); 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_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cyvcf/parser.pyx":472
 *         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_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 = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_kp_s_);
    __pyx_t_6 = __pyx_kp_s_;
    __pyx_L4_bool_binop_done:;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->FILTER); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
    } else {
      __Pyx_INCREF(__pyx_v_self->FILTER);
      __pyx_t_7 = __pyx_v_self->FILTER;
      goto __pyx_L6_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_kp_s_);
    __pyx_t_7 = __pyx_kp_s_;
    __pyx_L6_bool_binop_done:;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_info); 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_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_9); 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cyvcf/parser.pyx":471
 *     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_9 = PyList_New(9); 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);
    __Pyx_INCREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->CHROM);
    __Pyx_GIVEREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_9, 3, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_9, 4, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_9, 5, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_9, 6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_9, 7, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_self->FORMAT);
    PyList_SET_ITEM(__pyx_t_9, 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_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __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_core = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":473
 *             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_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(__pyx_v_self->samples == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_9 = __pyx_v_self->samples; __Pyx_INCREF(__pyx_t_9); __pyx_t_11 = 0;
    for (;;) {
      if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_9)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_sample); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_sample); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_sample);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_sample);
        __Pyx_GIVEREF(__pyx_v_sample);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __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 = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_samples = ((PyObject*)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "cyvcf/parser.pyx":474
 *                           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_9 = PyNumber_Add(__pyx_v_core, __pyx_kp_s__28); 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 = PyNumber_Add(__pyx_t_9, __pyx_v_samples); 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":476
 *             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_8 = __Pyx_PyInt_From_int(__pyx_v_self->POS); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_self->ID);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->ID);
    __Pyx_GIVEREF(__pyx_v_self->ID);
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_self->REF);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->REF);
    __Pyx_GIVEREF(__pyx_v_self->REF);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_alt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":477
 *         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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_qual); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L10_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_kp_s_);
    __pyx_t_5 = __pyx_kp_s_;
    __pyx_L10_bool_binop_done:;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->FILTER); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
    } else {
      __Pyx_INCREF(__pyx_v_self->FILTER);
      __pyx_t_3 = __pyx_v_self->FILTER;
      goto __pyx_L12_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_kp_s_);
    __pyx_t_3 = __pyx_kp_s_;
    __pyx_L12_bool_binop_done:;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":476
 *             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_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->CHROM);
    __Pyx_GIVEREF(__pyx_v_self->CHROM);
    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_2, 3, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_2, 4, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyList_SET_ITEM(__pyx_t_2, 5, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_2, 6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_2, 7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_8 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_9 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__28, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":469
 *                 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_XDECREF(__pyx_t_10);
  __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":480
 * 
 * 
 *     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":481
 * 
 *     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 = 481; __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 = 481; __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 = 481; __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 = 481; __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 = 481; __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 = 481; __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 = 481; __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 = 481; __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":480
 * 
 * 
 *     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":483
 *         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":484
 * 
 *     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 = 484; __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 = 484; __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":485
 *     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 = 485; __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":483
 *         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":487
 *         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":488
 * 
 *     def add_filter(self, flt):
 *         if self.FILTER is None or self.FILTER == b'PASS':             # <<<<<<<<<<<<<<
 *             self.FILTER = b''
 *         else:
 */
  __pyx_t_2 = (__pyx_v_self->FILTER == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_self->FILTER, __pyx_n_b_PASS, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":489
 *     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__20);
    __Pyx_GIVEREF(__pyx_kp_b__20);
    __Pyx_GOTREF(__pyx_v_self->FILTER);
    __Pyx_DECREF(__pyx_v_self->FILTER);
    __pyx_v_self->FILTER = __pyx_kp_b__20;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":491
 *             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 = 491; __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":492
 *         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":493
 *             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 = 493; __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":494
 *             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":487
 *         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":496
 *         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 = 496; __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 = 496; __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":497
 * 
 *     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 = 497; __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 = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":496
 *         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":499
 *         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":501
 *     def genotype(self, name):
 *         """ Lookup a ``_Call`` for the sample given in ``name`` """
 *         return self.samples[self._sample_indexes[name]]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __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 = 501; __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 = 501; __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 = 501; __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 = 501; __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":499
 *         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":504
 * 
 *     @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":506
 *     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 = 506; __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 = 506; __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 = 506; __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 = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":504
 * 
 *     @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":509
 * 
 *     @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":515
 *         """
 *         # 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 = 515; __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 = 515; __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":516
 *         # 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":517
 *         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":518
 *             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 = 518; __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":519
 *         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 = 519; __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":520
 *         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":521
 *         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":522
 *         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":524
 *             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 = 524; __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 = 524; __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 = 524; __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 = 524; __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 = 524; __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":509
 * 
 *     @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":527
 * 
 *     @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":539
 *         """
 *         # 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 = 539; __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 = 539; __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":540
 *         # 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":541
 *         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 = 541; __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":542
 *             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 = 542; __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":543
 *         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":544
 *         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 = 544; __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 = 544; __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 = 544; __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 = 544; __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 = 544; __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":527
 * 
 *     @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":546
 *         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":548
 *     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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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":546
 *         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":550
 *         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":552
 *     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 = 552; __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 = 552; __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 = 552; __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 = 552; __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 = 552; __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 = 552; __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 = 552; __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 = 552; __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":550
 *         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":554
 *         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":556
 *     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 = 556; __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 = 556; __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 = 556; __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 = 556; __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 = 556; __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 = 556; __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 = 556; __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 = 556; __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":554
 *         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":558
 *         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":560
 *     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 = 560; __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 = 560; __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 = 560; __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 = 560; __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 = 560; __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 = 560; __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":558
 *         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":563
 * 
 *     @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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_snp", 0);

  /* "cyvcf/parser.pyx":565
 *     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);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __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":566
 *         """ 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 = 566; __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 = 566; __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 = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_alt, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":567
 *         if len(self.REF) > 1: return False
 *         for alt in self.ALT:
 *             if alt not in ['A', 'C', 'G', 'T']:             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
    __Pyx_INCREF(__pyx_v_alt);
    __pyx_t_4 = __pyx_v_alt;
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_A, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __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 = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_G, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_T, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_5;
    __pyx_L7_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (__pyx_t_5) {

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

    /* "cyvcf/parser.pyx":566
 *         """ 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
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":569
 *             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":563
 * 
 *     @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":572
 * 
 *     @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;
  int __pyx_t_2;
  Py_ssize_t __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":574
 *     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 = 574; __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":576
 *         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);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_sv); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":577
 * 
 *         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 = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __pyx_v_self->ALT; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_alt, __pyx_t_6);
    __pyx_t_6 = 0;

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

      /* "cyvcf/parser.pyx":579
 *         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":580
 *             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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __pyx_v_self->REF;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = ((__pyx_t_7 != __pyx_t_8) != 0);
    if (__pyx_t_5) {

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

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

    /* "cyvcf/parser.pyx":577
 * 
 *         if len(self.REF) > 1 and not is_sv: return True
 *         for alt in self.ALT:             # <<<<<<<<<<<<<<
 *             if alt is None:
 *                 return True
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":588
 *                     # 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":572
 * 
 *     @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":591
 * 
 *     @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":593
 *     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 = 593; __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 = 593; __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":594
 *         """ 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":595
 *         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":591
 * 
 *     @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":598
 * 
 *     @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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_transition", 0);

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

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

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

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

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

      /* "cyvcf/parser.pyx":610
 *                 (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":611
 *                 (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":612
 *                 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":598
 * 
 *     @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":615
 * 
 *     @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":618
 *         """ 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 = 618; __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 = 618; __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":620
 *         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 = 620; __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 = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":622
 *         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 = 622; __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 = 622; __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":623
 *             # 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":624
 *             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":625
 *             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);
    __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __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 = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = ((__pyx_t_2 > __pyx_t_5) != 0);
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":626
 *                 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":627
 *             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":628
 *                 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":615
 * 
 *     @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":631
 * 
 *     @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":636
 *         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 = 636; __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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":637
 *         """
 *         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":638
 *         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 = 638; __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 = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":639
 *             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":640
 *         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 = 640; __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 = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":641
 *             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":643
 *             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":631
 * 
 *     @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":646
 * 
 *     @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":669
 *         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 = 669; __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 = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":670
 *         """
 *         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 = 670; __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 = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":671
 *         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":672
 *             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 = 672; __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 = 672; __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":673
 *                 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":675
 *                 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":676
 *             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 = 676; __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 = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":677
 *                 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 = 677; __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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":678
 *         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":679
 *             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 = 679; __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 = 679; __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":680
 *                 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":682
 *                 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":683
 *             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 = 683; __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 = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":684
 *                 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 = 684; __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 = 684; __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 = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":685
 *         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":686
 *             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 = 686; __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 = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cyvcf/parser.pyx":687
 *                 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 = 687; __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 = 687; __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":690
 *             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 = 690; __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 = 690; __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 = 690; __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 = 690; __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":692
 *                 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":646
 * 
 *     @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":695
 * 
 *     @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":697
 *     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 = 697; __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 = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":698
 *         """ 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 = 698; __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 = 698; __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":699
 *         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":695
 * 
 *     @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":702
 * 
 *     @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
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sv_precise", 0);

  /* "cyvcf/parser.pyx":706
 *             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 = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_IMPRECISE, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = ((!__pyx_t_4) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":707
 *         """
 *         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":708
 *         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 = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_IMPRECISE, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":709
 *             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":710
 *         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 = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->INFO, __pyx_n_s_IMPRECISE, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_sv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":711
 *             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":702
 * 
 *     @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_2);
  __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":714
 * 
 *     @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;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monomorphic", 0);

  /* "cyvcf/parser.pyx":716
 *     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_2 = __pyx_v_self->ALT;
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 == 1);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  if (unlikely(__pyx_v_self->ALT == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ALT, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":714
 * 
 *     @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_XDECREF(__pyx_t_2);
  __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":364
 * 
 *     # initialize Cython variables for all of the base attrs.
 *     cdef public list alleles, samples, ALT, gt_bases, gt_types, gt_phases, \             # <<<<<<<<<<<<<<
 *               gt_depths, gt_ref_depths, gt_alt_depths, gt_quals, gt_copy_numbers,\
 *               gt_phred_likelihoods
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_7alleles_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_7alleles_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7alleles_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_7alleles_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __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;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_7alleles_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_7alleles_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7alleles_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_7alleles_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->alleles);
  __Pyx_DECREF(__pyx_v_self->alleles);
  __pyx_v_self->alleles = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_7samples_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_7samples_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7samples_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_7samples_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(__pyx_v_self->samples);
  __pyx_v_self->samples = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_7samples_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_7samples_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7samples_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_7samples_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(__pyx_v_self->samples);
  __pyx_v_self->samples = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_3ALT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_3ALT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3ALT_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_3ALT_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->ALT);
  __Pyx_DECREF(__pyx_v_self->ALT);
  __pyx_v_self->ALT = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_3ALT_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_3ALT_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3ALT_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_3ALT_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->ALT);
  __Pyx_DECREF(__pyx_v_self->ALT);
  __pyx_v_self->ALT = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_bases);
  __Pyx_DECREF(__pyx_v_self->gt_bases);
  __pyx_v_self->gt_bases = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_bases_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_bases);
  __Pyx_DECREF(__pyx_v_self->gt_bases);
  __pyx_v_self->gt_bases = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_types_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_types_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_types);
  __Pyx_DECREF(__pyx_v_self->gt_types);
  __pyx_v_self->gt_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_types_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_types_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_types);
  __Pyx_DECREF(__pyx_v_self->gt_types);
  __pyx_v_self->gt_types = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_phases);
  __Pyx_DECREF(__pyx_v_self->gt_phases);
  __pyx_v_self->gt_phases = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_9gt_phases_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_phases);
  __Pyx_DECREF(__pyx_v_self->gt_phases);
  __pyx_v_self->gt_phases = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":365
 *     # initialize Cython variables for all of the base attrs.
 *     cdef public list alleles, samples, ALT, gt_bases, gt_types, gt_phases, \
 *               gt_depths, gt_ref_depths, gt_alt_depths, gt_quals, gt_copy_numbers,\             # <<<<<<<<<<<<<<
 *               gt_phred_likelihoods
 *     # use bytes instead of char * because of C -> Python string complications
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_depths);
  __Pyx_DECREF(__pyx_v_self->gt_depths);
  __pyx_v_self->gt_depths = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_9gt_depths_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_depths);
  __Pyx_DECREF(__pyx_v_self->gt_depths);
  __pyx_v_self->gt_depths = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_ref_depths);
  __Pyx_DECREF(__pyx_v_self->gt_ref_depths);
  __pyx_v_self->gt_ref_depths = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_13gt_ref_depths_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_ref_depths);
  __Pyx_DECREF(__pyx_v_self->gt_ref_depths);
  __pyx_v_self->gt_ref_depths = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_alt_depths);
  __Pyx_DECREF(__pyx_v_self->gt_alt_depths);
  __pyx_v_self->gt_alt_depths = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_13gt_alt_depths_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_alt_depths);
  __Pyx_DECREF(__pyx_v_self->gt_alt_depths);
  __pyx_v_self->gt_alt_depths = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_quals);
  __Pyx_DECREF(__pyx_v_self->gt_quals);
  __pyx_v_self->gt_quals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_8gt_quals_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_quals);
  __Pyx_DECREF(__pyx_v_self->gt_quals);
  __pyx_v_self->gt_quals = ((PyObject*)Py_None);

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_copy_numbers);
  __Pyx_DECREF(__pyx_v_self->gt_copy_numbers);
  __pyx_v_self->gt_copy_numbers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_15gt_copy_numbers_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_copy_numbers);
  __Pyx_DECREF(__pyx_v_self->gt_copy_numbers);
  __pyx_v_self->gt_copy_numbers = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":366
 *     cdef public list alleles, samples, ALT, gt_bases, gt_types, gt_phases, \
 *               gt_depths, gt_ref_depths, gt_alt_depths, gt_quals, gt_copy_numbers,\
 *               gt_phred_likelihoods             # <<<<<<<<<<<<<<
 *     # use bytes instead of char * because of C -> Python string complications
 *     # see: http://docs.cython.org/src/tutorial/strings.html
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_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_20gt_phred_likelihoods___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_20gt_phred_likelihoods___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_phred_likelihoods);
  __pyx_r = __pyx_v_self->gt_phred_likelihoods;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gt_phred_likelihoods);
  __Pyx_DECREF(__pyx_v_self->gt_phred_likelihoods);
  __pyx_v_self->gt_phred_likelihoods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gt_phred_likelihoods);
  __Pyx_DECREF(__pyx_v_self->gt_phred_likelihoods);
  __pyx_v_self->gt_phred_likelihoods = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":369
 *     # use bytes instead of char * because of C -> Python string complications
 *     # see: http://docs.cython.org/src/tutorial/strings.html
 *     cdef readonly bytes CHROM, ID, FORMAT             # <<<<<<<<<<<<<<
 *     cdef public REF
 *     cdef readonly object FILTER, QUAL
 */

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

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

/* 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":370
 *     # see: http://docs.cython.org/src/tutorial/strings.html
 *     cdef readonly bytes CHROM, ID, FORMAT
 *     cdef public REF             # <<<<<<<<<<<<<<
 *     cdef readonly object FILTER, QUAL
 *     cdef public int POS, start, end, num_hom_ref, num_het, num_hom_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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_3REF_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_3REF_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3REF_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_3REF_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->REF);
  __Pyx_DECREF(__pyx_v_self->REF);
  __pyx_v_self->REF = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_3REF_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_3REF_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3REF_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_3REF_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->REF);
  __Pyx_DECREF(__pyx_v_self->REF);
  __pyx_v_self->REF = Py_None;

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

/* "cyvcf/parser.pyx":371
 *     cdef readonly bytes CHROM, ID, FORMAT
 *     cdef public REF
 *     cdef readonly object FILTER, QUAL             # <<<<<<<<<<<<<<
 *     cdef public int POS, start, end, num_hom_ref, num_het, num_hom_alt, \
 *              num_unknown, num_called
 */

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

/* 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":372
 *     cdef public REF
 *     cdef readonly object FILTER, QUAL
 *     cdef public int POS, start, end, num_hom_ref, num_het, num_hom_alt, \             # <<<<<<<<<<<<<<
 *              num_unknown, num_called
 *     cdef public dict INFO
 */

/* 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 = 372; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_3POS_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_3POS_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3POS_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_3POS_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->POS = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_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 = 372; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_5start_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_5start_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->start = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_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 = 372; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_3end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_3end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_3end_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_3end_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->end = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_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 = 372; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_ref_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->num_hom_ref = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_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 = 372; __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;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_7num_het_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_7num_het_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_7num_het_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_7num_het_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->num_het = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_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);
  __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 = 372; __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_alt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_alt_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_alt_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_11num_hom_alt_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->num_hom_alt = __pyx_t_1;

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

/* "cyvcf/parser.pyx":373
 *     cdef readonly object FILTER, QUAL
 *     cdef public int POS, start, end, num_hom_ref, num_het, num_hom_alt, \
 *              num_unknown, num_called             # <<<<<<<<<<<<<<
 *     cdef public dict INFO
 *     cdef readonly dict _sample_indexes
 */

/* 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);
  __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 = 373; __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_unknown.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_11num_unknown_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_11num_unknown_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_11num_unknown_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_11num_unknown_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->num_unknown = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_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);
  __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 = 373; __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_called.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_10num_called_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_10num_called_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_10num_called_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_10num_called_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->num_called = __pyx_t_1;

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

/* "cyvcf/parser.pyx":374
 *     cdef public int POS, start, end, num_hom_ref, num_het, num_hom_alt, \
 *              num_unknown, num_called
 *     cdef public dict INFO             # <<<<<<<<<<<<<<
 *     cdef readonly dict _sample_indexes
 *     cdef readonly bint has_genotypes
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_4INFO_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_4INFO_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_4INFO_2__set__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_4INFO_2__set__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->INFO);
  __Pyx_DECREF(__pyx_v_self->INFO);
  __pyx_v_self->INFO = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_7_Record_4INFO_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_7_Record_4INFO_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_7_Record_4INFO_4__del__(((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_7_Record_4INFO_4__del__(struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->INFO);
  __Pyx_DECREF(__pyx_v_self->INFO);
  __pyx_v_self->INFO = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":375
 *              num_unknown, num_called
 *     cdef public dict INFO
 *     cdef readonly dict _sample_indexes             # <<<<<<<<<<<<<<
 *     cdef readonly bint has_genotypes
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_15_sample_indexes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_15_sample_indexes_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_15_sample_indexes___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_15_sample_indexes___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->_sample_indexes);
  __pyx_r = __pyx_v_self->_sample_indexes;
  goto __pyx_L0;

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

/* "cyvcf/parser.pyx":376
 *     cdef public dict INFO
 *     cdef readonly dict _sample_indexes
 *     cdef readonly bint has_genotypes             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, char *CHROM, int POS, char *ID,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13has_genotypes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_7_Record_13has_genotypes_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_13has_genotypes___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_13has_genotypes___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_PyBool_FromLong(__pyx_v_self->has_genotypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __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.has_genotypes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":735
 *     cdef public _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 = 735; __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 = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "cyvcf/parser.pyx":736
 * 
 *     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 = 736; __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 = 735; __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":735
 *     cdef public _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;
  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("__init__", 0);
  __Pyx_INCREF(__pyx_v_filename);

  /* "cyvcf/parser.pyx":743
 *             can be forced with ``compressed=True``
 *         """
 *         super(VCFReader, self).__init__()             # <<<<<<<<<<<<<<
 * 
 *         if not (fsock or filename):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_VCFReader); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __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 = 743; __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(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __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_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __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":745
 *         super(VCFReader, self).__init__()
 * 
 *         if not (fsock or filename):             # <<<<<<<<<<<<<<
 *             raise Exception('You must provide at least fsock or filename')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_fsock); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "cyvcf/parser.pyx":746
 * 
 *         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 = 746; __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 = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

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

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

      /* "cyvcf/parser.pyx":751
 *             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 = 751; __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_3 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_self->reader);
      __Pyx_DECREF(__pyx_v_self->reader);
      __pyx_v_self->reader = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;
    goto __pyx_L6;
  }
  __pyx_L6:;

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

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

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

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

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

  /* "cyvcf/parser.pyx":760
 *             self.filename = filename
 * 
 *         if compressed or (filename and filename.endswith('.gz')):             # <<<<<<<<<<<<<<
 *             self.reader = gzip.GzipFile(fileobj=self.reader)
 * 
 */
  __pyx_t_5 = (__pyx_v_compressed != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_5;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":761
 * 
 *         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 = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __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 = 761; __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 = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_L11;
  }
  __pyx_L11:;

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

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

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

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

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

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

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

  /* "cyvcf/parser.pyx":774
 *         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":775
 *         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":776
 *         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":777
 *         self._tabix = None
 *         self._prepend_chr = prepend_chr
 *         self._parse_metainfo()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_metainfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __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_2); __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":735
 *     cdef public _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_3);
  __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":779
 *         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":780
 * 
 *     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":779
 *         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":782
 *         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;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("seek", 0);

  /* "cyvcf/parser.pyx":783
 * 
 *     def seek(self, offset):
 *         self.reader.seek(offset)             # <<<<<<<<<<<<<<
 * 
 *     def tell(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_seek); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __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 = NULL;
    __Pyx_INCREF(__pyx_v_offset);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_offset);
    __Pyx_GIVEREF(__pyx_v_offset);
    __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 = 783; __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;

  /* "cyvcf/parser.pyx":782
 *         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_XDECREF(__pyx_t_4);
  __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":785
 *         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;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tell", 0);

  /* "cyvcf/parser.pyx":786
 * 
 *     def tell(self):
 *         return self.reader.tell()             # <<<<<<<<<<<<<<
 * 
 *     property raw_header:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_tell); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":785
 *         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_XDECREF(__pyx_t_3);
  __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":790
 *     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":791
 *         """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__20, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __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":790
 *     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":793
 *             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;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_metainfo", 0);

  /* "cyvcf/parser.pyx":803
 *         #     setattr(self, attr, {})
 * 
 *         parser = _vcf_metadata_parser()             # <<<<<<<<<<<<<<
 * 
 *         line = self.reader.next()
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_vcf_metadata_parser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_parser = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":805
 *         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 = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_line = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":806
 * 
 *         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 = 806; __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 = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_4) break;

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

    /* "cyvcf/parser.pyx":808
 *         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 = 808; __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 = 808; __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":810
 *             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 = 810; __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 = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":811
 * 
 *             if line.startswith('##INFO'):
 *                 key, val = parser.read_info(line)             # <<<<<<<<<<<<<<
 *                 self.infos[key] = val
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_info); 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_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_line); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_line);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_line);
        __Pyx_GIVEREF(__pyx_v_line);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        #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 = 811; __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_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); 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_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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_6);
      __pyx_t_6 = 0;

      /* "cyvcf/parser.pyx":812
 *             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 = 812; __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 = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }

    /* "cyvcf/parser.pyx":814
 *                 self.infos[key] = val
 * 
 *             elif line.startswith('##FILTER'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_filter(line)
 *                 self.filters[key] = val
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":815
 * 
 *             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 = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_line); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __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 = NULL;
        __Pyx_INCREF(__pyx_v_line);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_line);
        __Pyx_GIVEREF(__pyx_v_line);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __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_2); __pyx_t_2 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __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_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_t_6); 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_6); __pyx_t_6 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cyvcf/parser.pyx":816
 *             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 = 816; __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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }

    /* "cyvcf/parser.pyx":818
 *                 self.filters[key] = val
 * 
 *             elif line.startswith('##FORMAT'):             # <<<<<<<<<<<<<<
 *                 key, val = parser.read_format(line)
 *                 self.formats[key] = val
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "cyvcf/parser.pyx":819
 * 
 *             elif line.startswith('##FORMAT'):
 *                 key, val = parser.read_format(line)             # <<<<<<<<<<<<<<
 *                 self.formats[key] = val
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_line); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        __pyx_t_1 = PyTuple_New(1+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_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_line);
        PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_line);
        __Pyx_GIVEREF(__pyx_v_line);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __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_6); __pyx_t_6 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        #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 = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PySequence_ITEM(sequence, 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);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cyvcf/parser.pyx":820
 *             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 = 820; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":823
 * 
 *             else:
 *                 key, val = parser.read_meta(line.strip())             # <<<<<<<<<<<<<<
 *                 self.metadata[key] = val
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_read_meta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __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 = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_8) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __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 = NULL;
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        #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 = 823; __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_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_L12_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_8 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __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 = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L13_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cyvcf/parser.pyx":824
 *             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 = 824; __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 = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;

    /* "cyvcf/parser.pyx":826
 *                 self.metadata[key] = val
 * 
 *             line = self.reader.next()             # <<<<<<<<<<<<<<
 * 
 *         if line.startswith('#'):  # the column def'n line - REQ'D
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_next); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (__pyx_t_1) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "cyvcf/parser.pyx":828
 *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_4) {

    /* "cyvcf/parser.pyx":829
 * 
 *         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 = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = __pyx_v_line;
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __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_8);
    __pyx_t_8 = 0;

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

    /* "cyvcf/parser.pyx":831
 *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_1) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_fields = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":832
 *             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_8 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 9, 0, NULL, NULL, &__pyx_slice__42, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (!(likely(PyList_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_GOTREF(__pyx_v_self->samples);
    __Pyx_DECREF(__pyx_v_self->samples);
    __pyx_v_self->samples = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cyvcf/parser.pyx":833
 *             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_8 = __pyx_v_self->samples;
    __Pyx_INCREF(__pyx_t_8);
    if (unlikely(__pyx_t_8 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_9 = PyList_GET_SIZE(__pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_self->num_samples = __pyx_t_9;

    /* "cyvcf/parser.pyx":834
 *             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_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_3 = __pyx_int_0;
    __pyx_t_1 = __pyx_v_self->samples; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __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_3);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = __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 = 834; __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_8, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_GOTREF(__pyx_v_self->_sample_indexes);
    __Pyx_DECREF(__pyx_v_self->_sample_indexes);
    __pyx_v_self->_sample_indexes = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L14;
  }
  /*else*/ {

    /* "cyvcf/parser.pyx":836
 *             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_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __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_Call(__pyx_t_3, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_L14:;

  /* "cyvcf/parser.pyx":793
 *             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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __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":839
 * 
 * 
 *     cdef list _map(Reader self, func, iterable, char *bad='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None for x in iterable]
 */

static PyObject *__pyx_f_5cyvcf_6parser_6Reader__map(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_iterable, struct __pyx_opt_args_5cyvcf_6parser_6Reader__map *__pyx_optional_args) {
  char *__pyx_v_bad = ((char *)__pyx_k_);
  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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_map", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_bad = __pyx_optional_args->bad;
    }
  }

  /* "cyvcf/parser.pyx":841
 *     cdef list _map(Reader self, func, iterable, char *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 = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(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 = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(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 = 841; __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 = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 841; __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 = 841; __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 = 841; __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_PyBytes_FromString(__pyx_v_bad); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_v_x, __pyx_t_6, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_7) {
      __Pyx_INCREF(__pyx_v_func);
      __pyx_t_8 = __pyx_v_func; __pyx_t_9 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_9) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_x); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_5 = __pyx_t_6;
      __pyx_t_6 = 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 = 841; __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 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":839
 * 
 * 
 *     cdef list _map(Reader self, func, iterable, char *bad='.'):             # <<<<<<<<<<<<<<
 *         '''``map``, but make bad values None.'''
 *         return [func(x) if x != bad else None for x in iterable]
 */

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cyvcf.parser.Reader._map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":844
 * 
 * 
 *     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_11_parse_info(PyObject *__pyx_v_self, PyObject *__pyx_v_info_str); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_10_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_11_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_10_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_10_parse_info(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_info_str) {
  PyObject *__pyx_v_entries = 0;
  PyObject *__pyx_v_retdict = 0;
  int __pyx_v_i;
  int __pyx_v_n;
  char *__pyx_v_entry_type;
  PyObject *__pyx_v_entry = 0;
  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;
  int __pyx_t_7;
  char *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_info", 0);

  /* "cyvcf/parser.pyx":849
 * 
 *         '''
 *         if info_str == '.':             # <<<<<<<<<<<<<<
 *             return {}
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_info_str, __pyx_kp_s_, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "cyvcf/parser.pyx":850
 *         '''
 *         if info_str == '.':
 *             return {}             # <<<<<<<<<<<<<<
 * 
 *         cdef list 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 = 850; __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":852
 *             return {}
 * 
 *         cdef list entries = info_str.split(';')             # <<<<<<<<<<<<<<
 *         cdef dict 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 = 852; __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 = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_entries = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":853
 * 
 *         cdef list entries = info_str.split(';')
 *         cdef dict retdict = {}             # <<<<<<<<<<<<<<
 * 
 *         cdef int i = 0
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __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":855
 *         cdef dict retdict = {}
 * 
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef int n = len(entries)
 *         cdef char *entry_type
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":856
 * 
 *         cdef int i = 0
 *         cdef int n = len(entries)             # <<<<<<<<<<<<<<
 *         cdef char *entry_type
 *         cdef list entry
 */
  if (unlikely(__pyx_v_entries == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_entries); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "cyvcf/parser.pyx":860
 *         cdef list entry
 *         # 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":861
 *         # for entry in entries:
 *         for i in xrange(n):
 *             entry = entries[i].split('=')             # <<<<<<<<<<<<<<
 *             # entry = entry.split('=')
 *             ID = entry[0]
 */
    if (unlikely(__pyx_v_entries == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_entries, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __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 = 861; __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 = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF_SET(__pyx_v_entry, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cyvcf/parser.pyx":863
 *             entry = entries[i].split('=')
 *             # entry = entry.split('=')
 *             ID = entry[0]             # <<<<<<<<<<<<<<
 *             if ID in self.infos:
 *                 entry_type = self.infos[ID].type
 */
    if (unlikely(__pyx_v_entry == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_entry, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __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":864
 *             # entry = entry.split('=')
 *             ID = entry[0]
 *             if ID in self.infos:             # <<<<<<<<<<<<<<
 *                 entry_type = self.infos[ID].type
 *             elif ID in RESERVED_INFO:
 */
    if (unlikely(__pyx_v_self->infos == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_v_ID, __pyx_v_self->infos, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = (__pyx_t_1 != 0);
    if (__pyx_t_7) {

      /* "cyvcf/parser.pyx":865
 *             ID = entry[0]
 *             if ID in self.infos:
 *                 entry_type = self.infos[ID].type             # <<<<<<<<<<<<<<
 *             elif ID in RESERVED_INFO:
 *                 entry_type = RESERVED_INFO[ID]
 */
      if (unlikely(__pyx_v_self->infos == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 865; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_entry_type = __pyx_t_8;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L6;
    }

    /* "cyvcf/parser.pyx":866
 *             if ID in self.infos:
 *                 entry_type = self.infos[ID].type
 *             elif ID in RESERVED_INFO:             # <<<<<<<<<<<<<<
 *                 entry_type = RESERVED_INFO[ID]
 *             else:
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RESERVED_INFO); 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_t_7 = (__Pyx_PySequence_Contains(__pyx_v_ID, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = (__pyx_t_7 != 0);
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":867
 *                 entry_type = self.infos[ID].type
 *             elif ID in RESERVED_INFO:
 *                 entry_type = RESERVED_INFO[ID]             # <<<<<<<<<<<<<<
 *             else:
 *                 if entry[1]:
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RESERVED_INFO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_ID); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_entry_type = __pyx_t_8;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":869
 *                 entry_type = RESERVED_INFO[ID]
 *             else:
 *                 if entry[1]:             # <<<<<<<<<<<<<<
 *                     entry_type = 'String'
 *                 else:
 */
      if (unlikely(__pyx_v_entry == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "cyvcf/parser.pyx":870
 *             else:
 *                 if entry[1]:
 *                     entry_type = 'String'             # <<<<<<<<<<<<<<
 *                 else:
 *                     entry_type = 'Flag'
 */
        __pyx_v_entry_type = __pyx_k_String;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":872
 *                     entry_type = 'String'
 *                 else:
 *                     entry_type = 'Flag'             # <<<<<<<<<<<<<<
 * 
 *             """
 */
        __pyx_v_entry_type = __pyx_k_Flag;
      }
      __pyx_L7:;
    }
    __pyx_L6:;

    /* "cyvcf/parser.pyx":886
 *                         entry_type = 'Flag'
 *             """
 *             if entry_type == b'Integer':             # <<<<<<<<<<<<<<
 *                 vals = entry[1].split(',')
 *                 try:
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_3, __pyx_n_b_Integer, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":887
 *             """
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = _map(int, vals)
 */
      if (unlikely(__pyx_v_entry == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __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 = 887; __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__47, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __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_vals, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cyvcf/parser.pyx":888
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')
 *                 try:             # <<<<<<<<<<<<<<
 *                     val = _map(int, vals)
 *                 except ValueError:
 */
      {
        __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":889
 *                 vals = entry[1].split(',')
 *                 try:
 *                     val = _map(int, vals)             # <<<<<<<<<<<<<<
 *                 except ValueError:
 *                     val = _map(float, vals)
 */
          if (!(likely(PyList_CheckExact(__pyx_v_vals))||((__pyx_v_vals) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_vals)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __pyx_t_3 = __pyx_f_5cyvcf_6parser__map(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject*)__pyx_v_vals), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
          __pyx_t_3 = 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_L16_try_end;
        __pyx_L9_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cyvcf/parser.pyx":890
 *                 try:
 *                     val = _map(int, vals)
 *                 except ValueError:             # <<<<<<<<<<<<<<
 *                     val = _map(float, vals)
 *             elif entry_type == b'Float':
 */
        __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
        if (__pyx_t_12) {
          __Pyx_AddTraceback("cyvcf.parser.Reader._parse_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_13);

          /* "cyvcf/parser.pyx":891
 *                     val = _map(int, vals)
 *                 except ValueError:
 *                     val = _map(float, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')
 */
          if (!(likely(PyList_CheckExact(__pyx_v_vals))||((__pyx_v_vals) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_vals)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
          __pyx_t_14 = __pyx_f_5cyvcf_6parser__map(((PyObject *)((PyObject*)(&PyFloat_Type))), ((PyObject*)__pyx_v_vals), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_14);
          __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L10_exception_handled;
        }
        goto __pyx_L11_except_error;
        __pyx_L11_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_L10_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_L16_try_end:;
      }
      goto __pyx_L8;
    }

    /* "cyvcf/parser.pyx":892
 *                 except ValueError:
 *                     val = _map(float, vals)
 *             elif entry_type == b'Float':             # <<<<<<<<<<<<<<
 *                 vals = entry[1].split(',')
 *                 val = _map(float, vals)
 */
    __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_13, __pyx_n_b_Float, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":893
 *                     val = _map(float, vals)
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 val = _map(float, vals)
 *             elif entry_type == b'Flag':
 */
      if (unlikely(__pyx_v_entry == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_13);
      __pyx_t_13 = 0;

      /* "cyvcf/parser.pyx":894
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')
 *                 val = _map(float, vals)             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Flag':
 *                 val = True
 */
      if (!(likely(PyList_CheckExact(__pyx_v_vals))||((__pyx_v_vals) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_vals)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = __pyx_f_5cyvcf_6parser__map(((PyObject *)((PyObject*)(&PyFloat_Type))), ((PyObject*)__pyx_v_vals), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L8;
    }

    /* "cyvcf/parser.pyx":895
 *                 vals = entry[1].split(',')
 *                 val = _map(float, vals)
 *             elif entry_type == b'Flag':             # <<<<<<<<<<<<<<
 *                 val = True
 *             elif entry_type == b'String':
 */
    __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_13, __pyx_n_b_Flag, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":896
 *                 val = _map(float, vals)
 *             elif entry_type == b'Flag':
 *                 val = True             # <<<<<<<<<<<<<<
 *             elif entry_type == b'String':
 *                 if len(entry) > 1:
 */
      __Pyx_INCREF(Py_True);
      __Pyx_XDECREF_SET(__pyx_v_val, Py_True);
      goto __pyx_L8;
    }

    /* "cyvcf/parser.pyx":897
 *             elif entry_type == b'Flag':
 *                 val = True
 *             elif entry_type == b'String':             # <<<<<<<<<<<<<<
 *                 if len(entry) > 1:
 *                     val = entry[1]
 */
    __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_13, __pyx_n_b_String, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":898
 *                 val = True
 *             elif entry_type == b'String':
 *                 if len(entry) > 1:             # <<<<<<<<<<<<<<
 *                     val = entry[1]
 *                 else:
 */
      if (unlikely(__pyx_v_entry == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = PyList_GET_SIZE(__pyx_v_entry); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = ((__pyx_t_4 > 1) != 0);
      if (__pyx_t_1) {

        /* "cyvcf/parser.pyx":899
 *             elif entry_type == b'String':
 *                 if len(entry) > 1:
 *                     val = entry[1]             # <<<<<<<<<<<<<<
 *                 else:
 *                     val = True
 */
        if (unlikely(__pyx_v_entry == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_13);
        __pyx_t_13 = 0;
        goto __pyx_L19;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":901
 *                     val = entry[1]
 *                 else:
 *                     val = True             # <<<<<<<<<<<<<<
 *             elif entry_type == b'Character':
 *                 val = entry[1]
 */
        __Pyx_INCREF(Py_True);
        __Pyx_XDECREF_SET(__pyx_v_val, Py_True);
      }
      __pyx_L19:;
      goto __pyx_L8;
    }

    /* "cyvcf/parser.pyx":902
 *                 else:
 *                     val = True
 *             elif entry_type == b'Character':             # <<<<<<<<<<<<<<
 *                 val = entry[1]
 * 
 */
    __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_13, __pyx_n_b_Character, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_1) {

      /* "cyvcf/parser.pyx":903
 *                     val = True
 *             elif entry_type == b'Character':
 *                 val = entry[1]             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      if (unlikely(__pyx_v_entry == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "cyvcf/parser.pyx":905
 *                 val = entry[1]
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 if self.infos[ID].num == 1 and entry_type != b'String':
 *                     val = val[0]
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      /*try:*/ {

        /* "cyvcf/parser.pyx":906
 * 
 *             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 = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        }
        __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_self->infos, __pyx_v_ID); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;};
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L29_bool_binop_done;
        }
        __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_entry_type); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_t_13, __pyx_n_b_String, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_1 = __pyx_t_7;
        __pyx_L29_bool_binop_done:;
        if (__pyx_t_1) {

          /* "cyvcf/parser.pyx":907
 *             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 = 907; __pyx_clineno = __LINE__; goto __pyx_L20_error;} }
          __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L20_error;};
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_13);
          __pyx_t_13 = 0;
          goto __pyx_L28;
        }
        __pyx_L28:;
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L27_try_end;
      __pyx_L20_error:;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cyvcf/parser.pyx":908
 *                 if self.infos[ID].num == 1 and entry_type != b'String':
 *                     val = val[0]
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
      __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_12) {
        PyErr_Restore(0,0,0);
        goto __pyx_L21_exception_handled;
      }
      goto __pyx_L22_except_error;
      __pyx_L22_except_error:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      goto __pyx_L1_error;
      __pyx_L21_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      __pyx_L27_try_end:;
    }

    /* "cyvcf/parser.pyx":911
 *                 pass
 * 
 *             retdict[ID] = val             # <<<<<<<<<<<<<<
 * 
 *         return retdict
 */
    if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __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 = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":913
 *             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":844
 * 
 * 
 *     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_13);
  __Pyx_XDECREF(__pyx_t_14);
  __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":916
 * 
 * 
 *     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_13_parse_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_12_parse_samples[] = "Parse a sample entry according to the format specified in the FORMAT\n        column.";
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_13_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 = 916; __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 = 916; __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 = 916; __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 = 916; __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 = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_12_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_12_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;
  int __pyx_v_n;
  PyObject *__pyx_v_samp_fmt_types = 0;
  PyObject *__pyx_v_samp_fmt_nums = 0;
  int __pyx_v_i;
  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_gt_phred_likelihoods = 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_v_phred_likelihoods = 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":919
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 *         cdef list samp_fmt = samp_fmt_s.split(':')             # <<<<<<<<<<<<<<
 *         cdef int n = len(samp_fmt)
 *         cdef list samp_fmt_types = [None] * n
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_samp_fmt_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  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 = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_samp_fmt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":920
 *         column.'''
 *         cdef list samp_fmt = samp_fmt_s.split(':')
 *         cdef int n = len(samp_fmt)             # <<<<<<<<<<<<<<
 *         cdef list samp_fmt_types = [None] * n
 *         cdef list samp_fmt_nums = [None] * n
 */
  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 = 920; __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 = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "cyvcf/parser.pyx":921
 *         cdef list samp_fmt = samp_fmt_s.split(':')
 *         cdef int n = len(samp_fmt)
 *         cdef list samp_fmt_types = [None] * n             # <<<<<<<<<<<<<<
 *         cdef list samp_fmt_nums = [None] * n
 * 
 */
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None);
      __Pyx_GIVEREF(Py_None);
    }
  }
  __pyx_v_samp_fmt_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":922
 *         cdef int n = len(samp_fmt)
 *         cdef list samp_fmt_types = [None] * n
 *         cdef list samp_fmt_nums = [None] * n             # <<<<<<<<<<<<<<
 * 
 *         cdef int i = 0
 */
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None);
      __Pyx_GIVEREF(Py_None);
    }
  }
  __pyx_v_samp_fmt_nums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":924
 *         cdef list samp_fmt_nums = [None] * n
 * 
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef char *fmt
 *         # for fmt in samp_fmt:
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":927
 *         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":928
 *         # 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 = 928; __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 = 928; __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 = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fmt = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":929
 *         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":930
 *             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 = 930; __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 = 930; __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 = 930; __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 = 930; __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":931
 *             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 = 931; __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 = 931; __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 = 931; __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 = 931; __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":932
 *                 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 = 932; __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":933
 *                 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":934
 *             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":935
 *                 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 = 935; __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 = 935; __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 = 935; __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":936
 *                 try:
 *                     entry_type = RESERVED_FORMAT[fmt]
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     entry_type = 'String'
 *             samp_fmt_types[i] = 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 = 936; __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":937
 *                     entry_type = RESERVED_FORMAT[fmt]
 *                 except KeyError:
 *                     entry_type = 'String'             # <<<<<<<<<<<<<<
 *             samp_fmt_types[i] = entry_type
 *             samp_fmt_nums[i] = 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":938
 *                 except KeyError:
 *                     entry_type = 'String'
 *             samp_fmt_types[i] = entry_type             # <<<<<<<<<<<<<<
 *             samp_fmt_nums[i] = entry_num
 * 
 */
    if (unlikely(__Pyx_SetItemInt(__pyx_v_samp_fmt_types, __pyx_v_i, __pyx_v_entry_type, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":939
 *                     entry_type = 'String'
 *             samp_fmt_types[i] = entry_type
 *             samp_fmt_nums[i] = entry_num             # <<<<<<<<<<<<<<
 * 
 *         cdef int num_hom_ref = 0
 */
    if (unlikely(__Pyx_SetItemInt(__pyx_v_samp_fmt_nums, __pyx_v_i, __pyx_v_entry_num, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "cyvcf/parser.pyx":941
 *             samp_fmt_nums[i] = 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":942
 * 
 *         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":943
 *         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":944
 *         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":945
 *         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":946
 *         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 = 946; __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":947
 *         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 = 947; __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":948
 *         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 = 948; __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":949
 *         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 = 949; __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":950
 *         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 = 950; __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":951
 *         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 = 951; __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":952
 *         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 = 952; __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":953
 *         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.
 *         cdef list gt_phred_likelihoods = []
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __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":954
 *         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.             # <<<<<<<<<<<<<<
 *         cdef list gt_phred_likelihoods = []
 *         i = 0
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __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":955
 *         cdef list gt_quals  = []# 10, 30, 20, etc.
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, etc.
 *         cdef list gt_phred_likelihoods = []             # <<<<<<<<<<<<<<
 *         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 = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_gt_phred_likelihoods = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cyvcf/parser.pyx":956
 *         cdef list gt_copy_numbers  = []# 2, 1, 4, etc.
 *         cdef list gt_phred_likelihoods = []
 *         i = 0             # <<<<<<<<<<<<<<
 *         for i in xrange(self.num_samples):
 *             name = self.samples[i]
 */
  __pyx_v_i = 0;

  /* "cyvcf/parser.pyx":957
 *         cdef list gt_phred_likelihoods = []
 *         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":958
 *         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 = 958; __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 = 958; __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":959
 *         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 = 959; __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 = 959; __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":961
 *             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_6 = __Pyx_PyObject_AsString(__pyx_v_sample); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":962
 * 
 *             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_11 = ((struct __pyx_vtabstruct_5cyvcf_6parser_Reader *)__pyx_v_self->__pyx_vtab)->_parse_sample(__pyx_v_self, __pyx_t_6, __pyx_v_samp_fmt, __pyx_v_samp_fmt_types, __pyx_v_samp_fmt_nums, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_XDECREF_SET(__pyx_v_sampdict, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":963
 *             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_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->curr_record));
    PyTuple_SET_ITEM(__pyx_t_11, 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_11, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_sampdict);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_sampdict);
    __Pyx_GIVEREF(__pyx_v_sampdict);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Call)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_call, ((struct __pyx_obj_5cyvcf_6parser__Call *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":964
 *                                           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 = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":966
 *             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 = 966; __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":967
 * 
 *             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 = 967; __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":968
 *             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":969
 *             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 = 969; __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":970
 *             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 = 970; __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":971
 *             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 = 971; __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":972
 *             ref_depth = call.gt_ref_depth
 *             alt_depth = call.gt_alt_depth
 *             qual = call.gt_qual             # <<<<<<<<<<<<<<
 *             copy_number = call.gt_copy_number
 *             phred_likelihoods = call.gt_phred_likelihoods
 */
    __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 = 972; __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":973
 *             alt_depth = call.gt_alt_depth
 *             qual = call.gt_qual
 *             copy_number = call.gt_copy_number             # <<<<<<<<<<<<<<
 *             phred_likelihoods = call.gt_phred_likelihoods
 * 
 */
    __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 = 973; __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":974
 *             qual = call.gt_qual
 *             copy_number = call.gt_copy_number
 *             phred_likelihoods = call.gt_phred_likelihoods             # <<<<<<<<<<<<<<
 * 
 *             # add to the "all-samples" lists of GT info
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_call), __pyx_n_s_gt_phred_likelihoods); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_phred_likelihoods, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":977
 * 
 *             # 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":978
 *             # 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 = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":979
 *             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 = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L27;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":981
 *                 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 = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":982
 *             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 = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L27:;

    /* "cyvcf/parser.pyx":984
 *                 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 = 984; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cyvcf/parser.pyx":985
 * 
 *             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 = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":986
 *             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 = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":987
 *             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 = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":988
 *             gt_ref_depths.append(ref_depth)
 *             gt_alt_depths.append(alt_depth)
 *             gt_quals.append(qual)             # <<<<<<<<<<<<<<
 *             gt_copy_numbers.append(copy_number)
 *             gt_phred_likelihoods.append(phred_likelihoods)
 */
    __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 = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":989
 *             gt_alt_depths.append(alt_depth)
 *             gt_quals.append(qual)
 *             gt_copy_numbers.append(copy_number)             # <<<<<<<<<<<<<<
 *             gt_phred_likelihoods.append(phred_likelihoods)
 * 
 */
    __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 = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":990
 *             gt_quals.append(qual)
 *             gt_copy_numbers.append(copy_number)
 *             gt_phred_likelihoods.append(phred_likelihoods)             # <<<<<<<<<<<<<<
 * 
 *             # 0 / 00000000 hom ref
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_gt_phred_likelihoods, __pyx_v_phred_likelihoods); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "cyvcf/parser.pyx":998
 * 
 *             # 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 = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = PyObject_RichCompare(__pyx_v_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_hom_ref = (__pyx_v_num_hom_ref + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":999
 *             # 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_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_HET); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __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":1000
 *             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 = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = PyObject_RichCompare(__pyx_v_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_hom_alt = (__pyx_v_num_hom_alt + 1);
      goto __pyx_L28;
    }

    /* "cyvcf/parser.pyx":1001
 *             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_11 = PyObject_RichCompare(__pyx_v_type, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_20) {
      __pyx_v_num_unknown = (__pyx_v_num_unknown + 1);
      goto __pyx_L28;
    }
    __pyx_L28:;
  }

  /* "cyvcf/parser.pyx":1003
 *             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":1005
 *         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_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_SampleInfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __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 = 1005; __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 = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1006
 * 
 *         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 = 1005; __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 = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1007
 *         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 = 1005; __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 = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1008
 *                            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,
 *                            gt_phred_likelihoods=gt_phred_likelihoods,
 */
  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 = 1005; __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 = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1009
 *                            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,             # <<<<<<<<<<<<<<
 *                            gt_phred_likelihoods=gt_phred_likelihoods,
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 */
  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 = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1010
 *                            gt_alt_depths=gt_alt_depths, gt_quals=gt_quals,
 *                            gt_copy_numbers=gt_copy_numbers,
 *                            gt_phred_likelihoods=gt_phred_likelihoods,             # <<<<<<<<<<<<<<
 *                            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_phred_likelihoods, __pyx_v_gt_phred_likelihoods) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1011
 *                            gt_copy_numbers=gt_copy_numbers,
 *                            gt_phred_likelihoods=gt_phred_likelihoods,
 *                            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_1 = __Pyx_PyInt_From_int(__pyx_v_num_hom_ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_hom_ref, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_het); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_het, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1012
 *                            gt_phred_likelihoods=gt_phred_likelihoods,
 *                            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_1 = __Pyx_PyInt_From_int(__pyx_v_num_hom_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_hom_alt, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_unknown); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_unknown, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1013
 *                            num_hom_ref=num_hom_ref, num_het=num_het,
 *                            num_hom_alt=num_hom_alt, num_unknown=num_unknown,
 *                            num_called=num_called)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _parse_sample(Reader self, char *sample, list samp_fmt,
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_called); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_called, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1005
 *         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_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":916
 * 
 * 
 *     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_gt_phred_likelihoods);
  __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_XDECREF(__pyx_v_phred_likelihoods);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1015
 *                            num_called=num_called)
 * 
 *     cpdef _parse_sample(Reader self, char *sample, list samp_fmt,             # <<<<<<<<<<<<<<
 *                             list samp_fmt_types, list samp_fmt_nums):
 * 
 */

static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_parse_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5cyvcf_6parser_6Reader__parse_sample(CYTHON_UNUSED 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, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_sampdict = 0;
  PyObject *__pyx_v_lvals = 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;
  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 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  double __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_sample", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_sample); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_15_parse_sample)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sample); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_samp_fmt);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_samp_fmt);
      __Pyx_GIVEREF(__pyx_v_samp_fmt);
      __Pyx_INCREF(__pyx_v_samp_fmt_types);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_samp_fmt_types);
      __Pyx_GIVEREF(__pyx_v_samp_fmt_types);
      __Pyx_INCREF(__pyx_v_samp_fmt_nums);
      PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_samp_fmt_nums);
      __Pyx_GIVEREF(__pyx_v_samp_fmt_nums);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "cyvcf/parser.pyx":1018
 *                             list samp_fmt_types, list samp_fmt_nums):
 * 
 *         cdef dict sampdict = dict([(x, None) for x in samp_fmt])             # <<<<<<<<<<<<<<
 *         cdef list lvals
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_samp_fmt == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __pyx_v_samp_fmt; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __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 = 1018; __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 = 1018; __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 = 1018; __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 = 1018; __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":1022
 * 
 *         # 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_izip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1023
 *         # 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_2 = __Pyx_PyBytes_FromString(__pyx_v_sample); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_3 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_7) {
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
  }
  __Pyx_INCREF(__pyx_v_samp_fmt);
  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_samp_fmt);
  __Pyx_GIVEREF(__pyx_v_samp_fmt);
  __Pyx_INCREF(__pyx_v_samp_fmt_types);
  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_samp_fmt_types);
  __Pyx_GIVEREF(__pyx_v_samp_fmt_types);
  __Pyx_INCREF(__pyx_v_samp_fmt_nums);
  PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_v_samp_fmt_nums);
  __Pyx_GIVEREF(__pyx_v_samp_fmt_nums);
  PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_6, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __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_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1022
 * 
 *         # TO DO: Optimize this into a C-loop
 *         for fmt, entry_type, entry_num, vals in itertools.izip(             # <<<<<<<<<<<<<<
 *                 samp_fmt, samp_fmt_types, samp_fmt_nums, sample.split(':')):
 * 
 */
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_8(__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 = 1022; __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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_7,&__pyx_t_5};
        for (i=0; i < 4; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __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_3,&__pyx_t_2,&__pyx_t_7,&__pyx_t_5};
      __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __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 = 1022; __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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_fmt, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_entry_type, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_entry_num, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1026
 * 
 *             # short circuit the most common
 *             if vals in ('.', './.', '.|.', ""):             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = None
 *                 continue
 */
    __Pyx_INCREF(__pyx_v_vals);
    __pyx_t_1 = __pyx_v_vals;
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__27, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__51, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__20, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_11 = __pyx_t_12;
    __pyx_L10_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = (__pyx_t_11 != 0);
    if (__pyx_t_12) {

      /* "cyvcf/parser.pyx":1027
 *             # short circuit the most common
 *             if vals in ('.', './.', '.|.', ""):
 *                 sampdict[fmt] = None             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, Py_None) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "cyvcf/parser.pyx":1028
 *             if vals in ('.', './.', '.|.', ""):
 *                 sampdict[fmt] = None
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             # we don't need to split single entries
 */
      goto __pyx_L5_continue;
    }

    /* "cyvcf/parser.pyx":1031
 * 
 *             # 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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_11) {
    } else {
      __pyx_t_12 = __pyx_t_11;
      goto __pyx_L15_bool_binop_done;
    }
    __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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (__pyx_t_11 != 0);
    __pyx_t_12 = __pyx_t_13;
    __pyx_L15_bool_binop_done:;
    if (__pyx_t_12) {

      /* "cyvcf/parser.pyx":1032
 *             # 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_12 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_12) {

        /* "cyvcf/parser.pyx":1033
 *             if entry_num == 1 or ',' not in vals:
 *                 if entry_type == 'Integer':
 *                     try:             # <<<<<<<<<<<<<<
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {

            /* "cyvcf/parser.pyx":1034
 *                 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 = 1034; __pyx_clineno = __LINE__; goto __pyx_L18_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 = 1034; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L25_try_end;
          __pyx_L18_error:;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "cyvcf/parser.pyx":1035
 *                     try:
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:             # <<<<<<<<<<<<<<
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':
 */
          __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
          if (__pyx_t_17) {
            __Pyx_AddTraceback("cyvcf.parser.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GOTREF(__pyx_t_7);

            /* "cyvcf/parser.pyx":1036
 *                         sampdict[fmt] = int(vals)
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)             # <<<<<<<<<<<<<<
 *                 elif entry_type == 'Float':
 *                     sampdict[fmt] = float(vals)
 */
            __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_v_vals); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __pyx_t_2 = PyFloat_FromDouble(__pyx_t_18); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __Pyx_GOTREF(__pyx_t_2);
            if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L19_exception_handled;
          }
          goto __pyx_L20_except_error;
          __pyx_L20_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L19_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L25_try_end:;
        }
        goto __pyx_L17;
      }

      /* "cyvcf/parser.pyx":1037
 *                     except ValueError:
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':             # <<<<<<<<<<<<<<
 *                     sampdict[fmt] = float(vals)
 *                 else:
 */
      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_12) {

        /* "cyvcf/parser.pyx":1038
 *                         sampdict[fmt] = float(vals)
 *                 elif entry_type == 'Float':
 *                     sampdict[fmt] = float(vals)             # <<<<<<<<<<<<<<
 *                 else:
 *                     sampdict[fmt] = vals
 */
        __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_v_vals); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = PyFloat_FromDouble(__pyx_t_18); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __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 = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L17;
      }
      /*else*/ {

        /* "cyvcf/parser.pyx":1040
 *                     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 = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L17:;

      /* "cyvcf/parser.pyx":1042
 *                     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 = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_12) {

        /* "cyvcf/parser.pyx":1043
 * 
 *                 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 = 1043; __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 = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L28;
      }
      __pyx_L28:;

      /* "cyvcf/parser.pyx":1045
 *                     sampdict[fmt] = sampdict[fmt]
 * 
 *                 continue             # <<<<<<<<<<<<<<
 * 
 * 
 */
      goto __pyx_L5_continue;
    }

    /* "cyvcf/parser.pyx":1048
 * 
 * 
 *             lvals = 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 = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF_SET(__pyx_v_lvals, ((PyObject*)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cyvcf/parser.pyx":1050
 *             lvals = vals.split(',')
 * 
 *             if entry_type == 'Integer':             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = _map(int, lvals)
 *             elif entry_type in ('Float', 'Numeric'):
 */
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_entry_type, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "cyvcf/parser.pyx":1051
 * 
 *             if entry_type == 'Integer':
 *                 sampdict[fmt] = _map(int, lvals)             # <<<<<<<<<<<<<<
 *             elif entry_type in ('Float', 'Numeric'):
 *                 sampdict[fmt] = _map(float, lvals)
 */
      __pyx_t_5 = __pyx_f_5cyvcf_6parser__map(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_v_lvals, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L29;
    }

    /* "cyvcf/parser.pyx":1052
 *             if entry_type == 'Integer':
 *                 sampdict[fmt] = _map(int, lvals)
 *             elif entry_type in ('Float', 'Numeric'):             # <<<<<<<<<<<<<<
 *                 sampdict[fmt] = _map(float, lvals)
 *             else:
 */
    __Pyx_INCREF(__pyx_v_entry_type);
    __pyx_t_5 = __pyx_v_entry_type;
    __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_13) {
    } else {
      __pyx_t_12 = __pyx_t_13;
      goto __pyx_L30_bool_binop_done;
    }
    __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_Numeric, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __pyx_t_13;
    __pyx_L30_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = (__pyx_t_12 != 0);
    if (__pyx_t_13) {

      /* "cyvcf/parser.pyx":1053
 *                 sampdict[fmt] = _map(int, lvals)
 *             elif entry_type in ('Float', 'Numeric'):
 *                 sampdict[fmt] = _map(float, lvals)             # <<<<<<<<<<<<<<
 *             else:
 *                 sampdict[fmt] = vals
 */
      __pyx_t_5 = __pyx_f_5cyvcf_6parser__map(((PyObject *)((PyObject*)(&PyFloat_Type))), __pyx_v_lvals, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyDict_SetItem(__pyx_v_sampdict, __pyx_v_fmt, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L29;
    }
    /*else*/ {

      /* "cyvcf/parser.pyx":1055
 *                 sampdict[fmt] = _map(float, lvals)
 *             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 = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L29:;

    /* "cyvcf/parser.pyx":1022
 * 
 *         # 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_L5_continue:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1057
 *                 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":1015
 *                            num_called=num_called)
 * 
 *     cpdef _parse_sample(Reader 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cyvcf.parser.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sampdict);
  __Pyx_XDECREF(__pyx_v_lvals);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XDECREF(__pyx_v_entry_type);
  __Pyx_XDECREF(__pyx_v_entry_num);
  __Pyx_XDECREF(__pyx_v_vals);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_parse_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_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 = 1015; __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 = 1015; __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 = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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 = 1015; __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 = 1015; __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 = 1015; __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 = 1016; __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 = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_14_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_14_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_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_sample", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5cyvcf_6parser_6Reader__parse_sample(__pyx_v_self, __pyx_v_sample, __pyx_v_samp_fmt, __pyx_v_samp_fmt_types, __pyx_v_samp_fmt_nums, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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.Reader._parse_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1060
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 *         line = self.reader.next().rstrip()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_17__next__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5cyvcf_6parser_6Reader_16__next__[] = "Return the next record in the file.";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_5cyvcf_6parser_6Reader_16__next__;
#endif
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_17__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_16__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_16__next__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cyvcf/parser.pyx":1062
 *     def __next__(self):
 *         '''Return the next record in the file.'''
 *         line = self.reader.next().rstrip()             # <<<<<<<<<<<<<<
 *         self.parse(line)
 *         return self.curr_record
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reader, __pyx_n_s_next); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __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_GetAttrStr(__pyx_t_2, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_line = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1063
 *         '''Return the next record in the file.'''
 *         line = self.reader.next().rstrip()
 *         self.parse(line)             # <<<<<<<<<<<<<<
 *         return self.curr_record
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __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_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1064
 *         line = self.reader.next().rstrip()
 *         self.parse(line)
 *         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":1060
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 *         line = self.reader.next().rstrip()
 */

  /* 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.Reader.__next__", __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":1067
 * 
 * 
 *     def _update_genotype_info(self, var, sample_info):             # <<<<<<<<<<<<<<
 *         var.samples = sample_info.samples
 *         var.gt_bases = sample_info.gt_bases
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_19_update_genotype_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_19_update_genotype_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_var = 0;
  PyObject *__pyx_v_sample_info = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_update_genotype_info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var,&__pyx_n_s_sample_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_var)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sample_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_update_genotype_info", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_update_genotype_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __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_var = values[0];
    __pyx_v_sample_info = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_update_genotype_info", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader._update_genotype_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_18_update_genotype_info(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_var, __pyx_v_sample_info);

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

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_18_update_genotype_info(CYTHON_UNUSED struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_var, PyObject *__pyx_v_sample_info) {
  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("_update_genotype_info", 0);

  /* "cyvcf/parser.pyx":1068
 * 
 *     def _update_genotype_info(self, var, sample_info):
 *         var.samples = sample_info.samples             # <<<<<<<<<<<<<<
 *         var.gt_bases = sample_info.gt_bases
 *         var.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 = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_samples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1069
 *     def _update_genotype_info(self, var, sample_info):
 *         var.samples = sample_info.samples
 *         var.gt_bases = sample_info.gt_bases             # <<<<<<<<<<<<<<
 *         var.gt_types = sample_info.gt_types
 *         var.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 = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_bases, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1070
 *         var.samples = sample_info.samples
 *         var.gt_bases = sample_info.gt_bases
 *         var.gt_types = sample_info.gt_types             # <<<<<<<<<<<<<<
 *         var.gt_phases = sample_info.gt_phases
 *         var.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 = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1071
 *         var.gt_bases = sample_info.gt_bases
 *         var.gt_types = sample_info.gt_types
 *         var.gt_phases = sample_info.gt_phases             # <<<<<<<<<<<<<<
 *         var.gt_depths = sample_info.gt_depths
 *         var.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 = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_phases, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1072
 *         var.gt_types = sample_info.gt_types
 *         var.gt_phases = sample_info.gt_phases
 *         var.gt_depths = sample_info.gt_depths             # <<<<<<<<<<<<<<
 *         var.gt_ref_depths = sample_info.gt_ref_depths
 *         var.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 = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_depths, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1073
 *         var.gt_phases = sample_info.gt_phases
 *         var.gt_depths = sample_info.gt_depths
 *         var.gt_ref_depths = sample_info.gt_ref_depths             # <<<<<<<<<<<<<<
 *         var.gt_alt_depths = sample_info.gt_alt_depths
 *         var.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 = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_ref_depths, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1074
 *         var.gt_depths = sample_info.gt_depths
 *         var.gt_ref_depths = sample_info.gt_ref_depths
 *         var.gt_alt_depths = sample_info.gt_alt_depths             # <<<<<<<<<<<<<<
 *         var.gt_quals = sample_info.gt_quals
 *         var.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 = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_alt_depths, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1075
 *         var.gt_ref_depths = sample_info.gt_ref_depths
 *         var.gt_alt_depths = sample_info.gt_alt_depths
 *         var.gt_quals = sample_info.gt_quals             # <<<<<<<<<<<<<<
 *         var.gt_copy_numbers = sample_info.gt_copy_numbers
 *         var.gt_phred_likelihoods = sample_info.gt_phred_likelihoods
 */
  __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 = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_quals, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1076
 *         var.gt_alt_depths = sample_info.gt_alt_depths
 *         var.gt_quals = sample_info.gt_quals
 *         var.gt_copy_numbers = sample_info.gt_copy_numbers             # <<<<<<<<<<<<<<
 *         var.gt_phred_likelihoods = sample_info.gt_phred_likelihoods
 *         var.num_hom_ref = sample_info.num_hom_ref
 */
  __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 = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_copy_numbers, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1077
 *         var.gt_quals = sample_info.gt_quals
 *         var.gt_copy_numbers = sample_info.gt_copy_numbers
 *         var.gt_phred_likelihoods = sample_info.gt_phred_likelihoods             # <<<<<<<<<<<<<<
 *         var.num_hom_ref = sample_info.num_hom_ref
 *         var.num_het = sample_info.num_het
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample_info, __pyx_n_s_gt_phred_likelihoods); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_gt_phred_likelihoods, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1078
 *         var.gt_copy_numbers = sample_info.gt_copy_numbers
 *         var.gt_phred_likelihoods = sample_info.gt_phred_likelihoods
 *         var.num_hom_ref = sample_info.num_hom_ref             # <<<<<<<<<<<<<<
 *         var.num_het = sample_info.num_het
 *         var.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 = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_num_hom_ref, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1079
 *         var.gt_phred_likelihoods = sample_info.gt_phred_likelihoods
 *         var.num_hom_ref = sample_info.num_hom_ref
 *         var.num_het = sample_info.num_het             # <<<<<<<<<<<<<<
 *         var.num_hom_alt = sample_info.num_hom_alt
 *         var.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 = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_num_het, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1080
 *         var.num_hom_ref = sample_info.num_hom_ref
 *         var.num_het = sample_info.num_het
 *         var.num_hom_alt = sample_info.num_hom_alt             # <<<<<<<<<<<<<<
 *         var.num_unknown = sample_info.num_unknown
 *         var.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 = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_num_hom_alt, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1081
 *         var.num_het = sample_info.num_het
 *         var.num_hom_alt = sample_info.num_hom_alt
 *         var.num_unknown = sample_info.num_unknown             # <<<<<<<<<<<<<<
 *         var.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 = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_num_unknown, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1082
 *         var.num_hom_alt = sample_info.num_hom_alt
 *         var.num_unknown = sample_info.num_unknown
 *         var.num_called = sample_info.num_called             # <<<<<<<<<<<<<<
 * 
 *     def parse(self, line, set_self=True):
 */
  __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 = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_var, __pyx_n_s_num_called, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1067
 * 
 * 
 *     def _update_genotype_info(self, var, sample_info):             # <<<<<<<<<<<<<<
 *         var.samples = sample_info.samples
 *         var.gt_bases = sample_info.gt_bases
 */

  /* 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.Reader._update_genotype_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1084
 *         var.num_called = sample_info.num_called
 * 
 *     def parse(self, line, set_self=True):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 *         cdef list row
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_21parse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_line = 0;
  PyObject *__pyx_v_set_self = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,&__pyx_n_s_set_self,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_line)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_set_self);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __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_line = values[0];
    __pyx_v_set_self = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cyvcf.parser.Reader.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_20parse(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), __pyx_v_line, __pyx_v_set_self);

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

static PyObject *__pyx_pf_5cyvcf_6parser_6Reader_20parse(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_set_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;
  struct __pyx_obj_5cyvcf_6parser__Record *__pyx_v_curr = 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;
  double __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse", 0);

  /* "cyvcf/parser.pyx":1087
 *         '''Return the next record in the file.'''
 *         cdef list row
 *         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 = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __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 = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_row = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1090
 * 
 *         #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 = 1090; __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 = 1090; __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 = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_chrom = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1091
 *         #CHROM
 *         cdef bytes chrom = row[0]
 *         if self._prepend_chr:             # <<<<<<<<<<<<<<
 *             chrom = 'chr' + str(chrom)
 *         # POS
 */
  __pyx_t_3 = (__pyx_v_self->_prepend_chr != 0);
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1092
 *         cdef bytes chrom = row[0]
 *         if self._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 = 1092; __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 = 1092; __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 = 1092; __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 = 1092; __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":1094
 *             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 = 1094; __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 = 1094; __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 = 1094; __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 = 1094; __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":1096
 *         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 = 1096; __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 = 1096; __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 = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_id = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1098
 *         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 = 1098; __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 = 1098; __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 = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ref = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1100
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_row, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __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 = 1100; __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__54, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((struct __pyx_vtabstruct_5cyvcf_6parser_Reader *)__pyx_v_self->__pyx_vtab)->_map(__pyx_v_self, ((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_alt = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

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

    /* "cyvcf/parser.pyx":1104
 *         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":1106
 *             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 = 1106; __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 = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyFloat_FromDouble(__pyx_t_5); 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_v_qual = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cyvcf/parser.pyx":1108
 *             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 = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_kp_s__24, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 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 = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_row, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_v_filt = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1109
 *         #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_7 = (__Pyx_PyBytes_Equals(__pyx_v_filt, __pyx_n_b_PASS, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
  } else {
    __pyx_t_3 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_v_filt, __pyx_kp_b_, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __pyx_t_7;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_3) {

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

  /* "cyvcf/parser.pyx":1112
 *              filt = None
 *         #INFO
 *         cdef dict info = self._parse_info(row[7])             # <<<<<<<<<<<<<<
 *         #FORMAT
 *         cdef bytes fmt
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_row == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_row, 7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_info = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cyvcf/parser.pyx":1115
 *         #FORMAT
 *         cdef bytes fmt
 *         try:             # <<<<<<<<<<<<<<
 *             fmt = row[8]
 *         except IndexError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    /*try:*/ {

      /* "cyvcf/parser.pyx":1116
 *         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 = 1116; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, 8, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L8_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 = 1116; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __pyx_v_fmt = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
    }
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

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

      /* "cyvcf/parser.pyx":1118
 *             fmt = row[8]
 *         except IndexError:
 *             fmt = None             # <<<<<<<<<<<<<<
 * 
 *         curr = _Record(chrom, pos, id, ref, alt, qual, filt, info, fmt, self._sample_indexes)
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_fmt, ((PyObject*)Py_None));
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L9_exception_handled;
    }
    goto __pyx_L10_except_error;
    __pyx_L10_except_error:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    __pyx_L15_try_end:;
  }

  /* "cyvcf/parser.pyx":1120
 *             fmt = None
 * 
 *         curr = _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_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __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_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __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_self->_sample_indexes);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_v_self->_sample_indexes);
  __Pyx_GIVEREF(__pyx_v_self->_sample_indexes);
  __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cyvcf_6parser__Record)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_curr = ((struct __pyx_obj_5cyvcf_6parser__Record *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "cyvcf/parser.pyx":1123
 * 
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 *         if set_self:             # <<<<<<<<<<<<<<
 *             self.curr_record = curr
 *         if fmt is not None:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_set_self); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1124
 *         # collect GENOTYPE information for the current VCF record (self.curr_record)
 *         if set_self:
 *             self.curr_record = curr             # <<<<<<<<<<<<<<
 *         if fmt is not None:
 *             sample_info = self._parse_samples(row[9:], fmt)
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_curr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_curr));
    __Pyx_GOTREF(__pyx_v_self->curr_record);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->curr_record));
    __pyx_v_self->curr_record = __pyx_v_curr;
    goto __pyx_L18;
  }
  __pyx_L18:;

  /* "cyvcf/parser.pyx":1125
 *         if set_self:
 *             self.curr_record = curr
 *         if fmt is not None:             # <<<<<<<<<<<<<<
 *             sample_info = self._parse_samples(row[9:], fmt)
 *             self._update_genotype_info(curr, sample_info)
 */
  __pyx_t_3 = (__pyx_v_fmt != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_3 != 0);
  if (__pyx_t_7) {

    /* "cyvcf/parser.pyx":1126
 *             self.curr_record = curr
 *         if fmt is not None:
 *             sample_info = self._parse_samples(row[9:], fmt)             # <<<<<<<<<<<<<<
 *             self._update_genotype_info(curr, sample_info)
 *         return curr
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __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 = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_row, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_13 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
    }
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_fmt);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_v_fmt);
    __Pyx_GIVEREF(__pyx_v_fmt);
    __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sample_info = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "cyvcf/parser.pyx":1127
 *         if fmt is not None:
 *             sample_info = self._parse_samples(row[9:], fmt)
 *             self._update_genotype_info(curr, sample_info)             # <<<<<<<<<<<<<<
 *         return curr
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update_genotype_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_13 = 1;
      }
    }
    __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_8) {
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_curr));
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, ((PyObject *)__pyx_v_curr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_curr));
    __Pyx_INCREF(__pyx_v_sample_info);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_v_sample_info);
    __Pyx_GIVEREF(__pyx_v_sample_info);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L19;
  }
  __pyx_L19:;

  /* "cyvcf/parser.pyx":1128
 *             sample_info = self._parse_samples(row[9:], fmt)
 *             self._update_genotype_info(curr, sample_info)
 *         return curr             # <<<<<<<<<<<<<<
 * 
 *     def fetch(self, chrom, start, end=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_curr));
  __pyx_r = ((PyObject *)__pyx_v_curr);
  goto __pyx_L0;

  /* "cyvcf/parser.pyx":1084
 *         var.num_called = sample_info.num_called
 * 
 *     def parse(self, line, set_self=True):             # <<<<<<<<<<<<<<
 *         '''Return the next record in the file.'''
 *         cdef list row
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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);
  __Pyx_XDECREF(__pyx_v_sample_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cyvcf/parser.pyx":1130
 *         return curr
 * 
 *     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 = 1130; __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 = 1130; __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 = 1130; __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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  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":1135
 *             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 = 1135; __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 = 1135; __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":1136
 *         """
 *         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__56, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __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 = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

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

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

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

    /* "cyvcf/parser.pyx":1142
 * 
 *         if not self._tabix:
 *             self._tabix = pysam.Tabixfile(self.filename)             # <<<<<<<<<<<<<<
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pysam); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Tabixfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_self->filename);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_self->filename);
      __Pyx_GIVEREF(__pyx_v_self->filename);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_tabix);
    __Pyx_DECREF(__pyx_v_self->_tabix);
    __pyx_v_self->_tabix = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "cyvcf/parser.pyx":1144
 *             self._tabix = pysam.Tabixfile(self.filename)
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':             # <<<<<<<<<<<<<<
 *             chrom = chrom[3:]
 * 
 */
  __pyx_t_2 = (__pyx_v_self->_prepend_chr != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_chrom, 0, 3, NULL, NULL, &__pyx_slice__58, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_chr, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_3) {

    /* "cyvcf/parser.pyx":1145
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 *             chrom = chrom[3:]             # <<<<<<<<<<<<<<
 * 
 *         # not sure why tabix needs position -1
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_chrom, 3, 0, NULL, NULL, &__pyx_slice__59, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_chrom, __pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "cyvcf/parser.pyx":1148
 * 
 *         # not sure why tabix needs position -1
 *         start = start - 1             # <<<<<<<<<<<<<<
 * 
 *         if end is None:
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1150
 *         start = start - 1
 * 
 *         if end is None:             # <<<<<<<<<<<<<<
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:
 */
  __pyx_t_3 = (__pyx_v_end == Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "cyvcf/parser.pyx":1151
 * 
 *         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 = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_4) {
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_chrom);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_chrom);
    __Pyx_GIVEREF(__pyx_v_chrom);
    __Pyx_INCREF(__pyx_v_start);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_start);
    __Pyx_GIVEREF(__pyx_v_start);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __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_5); __pyx_t_5 = 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":1152
 *         if end is None:
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:             # <<<<<<<<<<<<<<
 *                 return self.next()
 *             except StopIteration:
 */
    {
      __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":1153
 *             self.reader = self._tabix.fetch(chrom, start, start+1)
 *             try:
 *                 return self.next()             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 return None
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (__pyx_t_8) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else {
          __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L14_try_return;
      }
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cyvcf/parser.pyx":1154
 *             try:
 *                 return self.next()
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
      if (__pyx_t_12) {
        __Pyx_AddTraceback("cyvcf.parser.Reader.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_8);

        /* "cyvcf/parser.pyx":1155
 *                 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_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L13_except_return;
      }
      goto __pyx_L12_except_error;
      __pyx_L12_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_L14_try_return:;
      __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_L0;
      __pyx_L13_except_return:;
      __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_L0;
    }
  }

  /* "cyvcf/parser.pyx":1157
 *                 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 = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_1) {
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
  }
  __Pyx_INCREF(__pyx_v_chrom);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_chrom);
  __Pyx_GIVEREF(__pyx_v_chrom);
  __Pyx_INCREF(__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  __Pyx_INCREF(__pyx_v_end);
  PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_end);
  __Pyx_GIVEREF(__pyx_v_end);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __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_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_8);
  __Pyx_GOTREF(__pyx_v_self->reader);
  __Pyx_DECREF(__pyx_v_self->reader);
  __pyx_v_self->reader = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cyvcf/parser.pyx":1158
 * 
 *         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":1130
 *         return curr
 * 
 *     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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __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":726
 *     cdef object reader
 *     cdef bint compressed, prepend_chr
 *     cdef public dict metadata, infos, filters, formats,             # <<<<<<<<<<<<<<
 *     cdef readonly dict _sample_indexes
 *     cdef list _header_lines, samp_data
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_8metadata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_8metadata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8metadata_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_8metadata_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_8metadata_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_8metadata_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8metadata_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_8metadata_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_5infos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_5infos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_5infos_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_5infos_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->infos);
  __Pyx_DECREF(__pyx_v_self->infos);
  __pyx_v_self->infos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_5infos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_5infos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_5infos_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_5infos_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->infos);
  __Pyx_DECREF(__pyx_v_self->infos);
  __pyx_v_self->infos = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_7filters_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_7filters_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7filters_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_7filters_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->filters);
  __Pyx_DECREF(__pyx_v_self->filters);
  __pyx_v_self->filters = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_7filters_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_7filters_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7filters_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_7filters_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->filters);
  __Pyx_DECREF(__pyx_v_self->filters);
  __pyx_v_self->filters = ((PyObject*)Py_None);

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

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

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_7formats_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_7formats_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7formats_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_7formats_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(__pyx_v_self->formats);
  __pyx_v_self->formats = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_7formats_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_7formats_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7formats_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_7formats_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(__pyx_v_self->formats);
  __pyx_v_self->formats = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":727
 *     cdef bint compressed, prepend_chr
 *     cdef public dict metadata, infos, filters, formats,
 *     cdef readonly dict _sample_indexes             # <<<<<<<<<<<<<<
 *     cdef list _header_lines, samp_data
 *     cdef public list samples
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_sample_indexes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_15_sample_indexes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_15_sample_indexes___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_15_sample_indexes___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->_sample_indexes);
  __pyx_r = __pyx_v_self->_sample_indexes;
  goto __pyx_L0;

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

/* "cyvcf/parser.pyx":729
 *     cdef readonly dict _sample_indexes
 *     cdef list _header_lines, samp_data
 *     cdef public list samples             # <<<<<<<<<<<<<<
 *     cdef object _tabix
 *     cdef public object filename
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_7samples_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_7samples_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7samples_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_7samples_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(__pyx_v_self->samples);
  __pyx_v_self->samples = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_7samples_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_7samples_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_7samples_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_7samples_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->samples);
  __Pyx_DECREF(__pyx_v_self->samples);
  __pyx_v_self->samples = ((PyObject*)Py_None);

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

/* "cyvcf/parser.pyx":731
 *     cdef public list samples
 *     cdef object _tabix
 *     cdef public object filename             # <<<<<<<<<<<<<<
 *     cdef int num_samples
 *     cdef public _Record curr_record
 */

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_8filename_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_8filename_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8filename_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_8filename_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->filename);
  __Pyx_DECREF(__pyx_v_self->filename);
  __pyx_v_self->filename = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_8filename_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_8filename_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_8filename_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_8filename_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->filename);
  __Pyx_DECREF(__pyx_v_self->filename);
  __pyx_v_self->filename = Py_None;

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

/* "cyvcf/parser.pyx":733
 *     cdef public object filename
 *     cdef int num_samples
 *     cdef public _Record curr_record             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, fsock=None, filename=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_11curr_record_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5cyvcf_6parser_6Reader_11curr_record_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_11curr_record___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_11curr_record___get__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->curr_record));
  __pyx_r = ((PyObject *)__pyx_v_self->curr_record);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_11curr_record_2__set__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_11curr_record_2__set__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5cyvcf_6parser__Record))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __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_1);
  __pyx_t_1 = 0;

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

/* Python wrapper */
static int __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5cyvcf_6parser_6Reader_11curr_record_4__del__(((struct __pyx_obj_5cyvcf_6parser_Reader *)__pyx_v_self));

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

static int __pyx_pf_5cyvcf_6parser_6Reader_11curr_record_4__del__(struct __pyx_obj_5cyvcf_6parser_Reader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __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 *)Py_None);

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

/* "cyvcf/parser.pyx":1166
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.stream = stream
 *         self.writer = csv.writer(stream, delimiter="\t")
 */

/* 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__ = {"__init__", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_1__init__, METH_VARARGS|METH_KEYWORDS, 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 = 1166; __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 = 1166; __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 = 1166; __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 = 1166; __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;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cyvcf/parser.pyx":1167
 * 
 *     def __init__(self, stream, template):
 *         self.stream = stream             # <<<<<<<<<<<<<<
 *         self.writer = csv.writer(stream, delimiter="\t")
 *         self.template = template
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stream, __pyx_v_stream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1168
 *     def __init__(self, stream, template):
 *         self.stream = stream
 *         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 = 1168; __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 = 1168; __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 = 1168; __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 = 1168; __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 = 1168; __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 = 1168; __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 = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1169
 *         self.stream = stream
 *         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 = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1171
 *         self.template = template
 * 
 *         for line in template.metadata.items():             # <<<<<<<<<<<<<<
 *             stream.write('##%s=%s\n' % line)
 *         for line in template.infos.values():
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_metadata); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_1);
      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 = 1171; __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":1172
 * 
 *         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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_v_line); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1171
 *         self.template = template
 * 
 *         for line in template.metadata.items():             # <<<<<<<<<<<<<<
 *             stream.write('##%s=%s\n' % line)
 *         for line in template.infos.values():
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1173
 *         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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_infos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __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 = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
      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 = 1173; __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":1174
 *             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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_INFO_ID_s_Number_s_Type_s_Descr, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cyvcf/parser.pyx":1173
 *         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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cyvcf/parser.pyx":1175
 *         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 = 1175; __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 = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __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_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      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 = 1175; __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":1176
 *             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 = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_2) {
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_FORMAT_ID_s_Number_s_Type_s_Des, __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __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":1175
 *         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_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cyvcf/parser.pyx":1177
 *         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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_filters); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __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 = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_1);
      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 = 1177; __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":1178
 *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_2 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_8) {
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_9, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_line);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_9, __pyx_v_line);
    __Pyx_GIVEREF(__pyx_v_line);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_FILTER_ID_s_Description_s, __pyx_t_10); 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_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cyvcf/parser.pyx":1177
 *         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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1180
 *             stream.write('##FILTER=<ID=%s,Description="%s">\n' % tuple(self._map(str, line)))
 * 
 *         self._write_header()             # <<<<<<<<<<<<<<
 * 
 *     def _write_header(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __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_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1166
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.stream = stream
 *         self.writer = csv.writer(stream, delimiter="\t")
 */

  /* 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_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __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":1182
 *         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 = {"_write_header", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_3_write_header, METH_O, 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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_write_header", 0);

  /* "cyvcf/parser.pyx":1184
 *     def _write_header(self):
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)             # <<<<<<<<<<<<<<
 * 
 *     def write_record(self, record):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_writerow); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fixed_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __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_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 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 = 1184; __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":1182
 *         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_XDECREF(__pyx_t_5);
  __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":1186
 *         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 = {"write_record", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_5write_record, METH_VARARGS|METH_KEYWORDS, __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 = 1186; __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 = 1186; __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 = 1186; __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;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write_record", 0);

  /* "cyvcf/parser.pyx":1188
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_CHROM); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_POS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_ID); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_REF); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_6) {
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, ((PyObject *)((PyObject*)(&PyString_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 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 = 1188; __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;

  /* "cyvcf/parser.pyx":1189
 *         """ 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 = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_ALT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __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_5); __pyx_t_5 = 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 = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_9) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_kp_s_);
  __pyx_t_5 = __pyx_kp_s_;
  __pyx_L3_bool_binop_done:;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_FILTER); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_9) {
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_4 = __pyx_t_7;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_kp_s_);
  __pyx_t_4 = __pyx_kp_s_;
  __pyx_L5_bool_binop_done:;

  /* "cyvcf/parser.pyx":1190
 *         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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_INFO); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_10) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else {
    __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
    PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "cyvcf/parser.pyx":1189
 *         """ 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_11 = PyList_New(5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_11, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_11, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_11, 3, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_11, 4, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_7 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __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_11); __pyx_t_11 = 0;
  __pyx_v_ffs = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cyvcf/parser.pyx":1192
 *                  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_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "cyvcf/parser.pyx":1193
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]             # <<<<<<<<<<<<<<
 *         self.writer.writerow(ffs + samples)
 * 
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_samples); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
    __pyx_t_1 = __pyx_t_11; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    __pyx_t_12 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  for (;;) {
    if (likely(!__pyx_t_12)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_11 = __pyx_t_12(__pyx_t_1);
      if (unlikely(!__pyx_t_11)) {
        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 = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_11);
    }
    __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":1192
 *                  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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_sample); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_13 = 1;
      }
    }
    __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_5) {
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    }
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_sample);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_v_sample);
    __Pyx_GIVEREF(__pyx_v_sample);
    __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __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_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "cyvcf/parser.pyx":1193
 * 
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]             # <<<<<<<<<<<<<<
 *         self.writer.writerow(ffs + samples)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_samples = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cyvcf/parser.pyx":1194
 *         samples = [self._format_sample(record.FORMAT, sample)
 *             for sample in record.samples]
 *         self.writer.writerow(ffs + samples)             # <<<<<<<<<<<<<<
 * 
 *     def _format_alt(self, alt):
 */
  __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 = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writerow); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_v_ffs, __pyx_v_samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __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_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cyvcf/parser.pyx":1186
 *         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_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __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":1196
 *         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 = {"_format_alt", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_7_format_alt, METH_VARARGS|METH_KEYWORDS, 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 = 1196; __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 = 1196; __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 = 1196; __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":1197
 * 
 *     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 = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(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 = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(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 = 1197; __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 = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 1197; __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 = 1197; __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 = 1197; __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 = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_6) {
    } else {
      __Pyx_INCREF(__pyx_v_x);
      __pyx_t_5 = __pyx_v_x;
      goto __pyx_L5_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_kp_s_);
    __pyx_t_5 = __pyx_kp_s_;
    __pyx_L5_bool_binop_done:;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __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 = 1197; __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":1196
 *         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":1199
 *         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 = {"_format_info", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_9_format_info, METH_VARARGS|METH_KEYWORDS, 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 = 1199; __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 = 1199; __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 = 1199; __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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_info", 0);

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

    /* "cyvcf/parser.pyx":1201
 *     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_);
    __pyx_r = __pyx_kp_s_;
    goto __pyx_L0;
  }

  /* "cyvcf/parser.pyx":1202
 *         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 = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_info, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__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 = 1202; __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 = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __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 = 1202; __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_6 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      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 = 1202; __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 = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stringify); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_y); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v_y);
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_y);
      __Pyx_GIVEREF(__pyx_v_y);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 1202; __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_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 1202; __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":1199
 *         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_6);
  __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":1204
 *         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 = {"_format_sample", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_11_format_sample, METH_VARARGS|METH_KEYWORDS, 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 = 1204; __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 = 1204; __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 = 1204; __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 = 1204; __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":1207
 *         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, __pyx_n_s_genexpr, __pyx_n_s_Writer__format_sample_locals_gen); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cyvcf.parser.Writer._format_sample.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = 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 = 1207; __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 = 1207; __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 = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __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)) || 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 = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(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 = 1207; __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 = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 1207; __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 = 1207; __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 = 1207; __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 = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_stringify); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample)) { __Pyx_RaiseClosureNameError("sample"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_sample, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 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 = 1207; __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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1204
 *         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":1205
 * 
 *     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 = 1205; __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 = 1205; __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":1206
 *     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":1207
 *         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 = 1207; __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 = 1207; __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":1204
 *         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":1209
 *         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 = {"_stringify", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_13_stringify, METH_VARARGS|METH_KEYWORDS, 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_));
    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 = 1209; __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 = 1209; __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 = 1209; __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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_stringify", 0);

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

    /* "cyvcf/parser.pyx":1211
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __Pyx_INCREF(__pyx_v_none);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_none);
    __Pyx_GIVEREF(__pyx_v_none);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __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":1212
 *         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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 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":1209
 *         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_XDECREF(__pyx_t_6);
  __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":1214
 *         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 = {"_map", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Writer_15_map, METH_VARARGS|METH_KEYWORDS, __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_));
    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 = 1214; __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 = 1214; __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 = 1214; __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 = 1214; __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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_map", 0);

  /* "cyvcf/parser.pyx":1216
 *     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 = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cyvcf/parser.pyx":1217
 *         '''``map``, but make None values none.'''
 *         return [func(x) if x is not None else none
 *                 for x in iterable]             # <<<<<<<<<<<<<<
 * 
 * def __update_readme():
 */
  if (likely(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 = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(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 = 1217; __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 = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        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 = 1217; __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 = 1217; __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 = 1217; __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":1216
 *     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_INCREF(__pyx_v_func);
      __pyx_t_8 = __pyx_v_func; __pyx_t_9 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_9) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_x); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_5 = __pyx_t_7;
      __pyx_t_7 = 0;
    } else {

      /* "cyvcf/parser.pyx":1217
 *         '''``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 = 1216; __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":1214
 *         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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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":1219
 *                 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 = {"__update_readme", (PyCFunction)__pyx_pw_5cyvcf_6parser_1__update_readme, METH_NOARGS, 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;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__update_readme", 0);

  /* "cyvcf/parser.pyx":1220
 * 
 * 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 = 1220; __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 = 1220; __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":1221
 * def __update_readme():
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)             # <<<<<<<<<<<<<<
 * 
 * # backwards compatibility
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vcf, __pyx_n_s_doc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __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_t_4 = NULL;
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __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_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cyvcf/parser.pyx":1219
 *                 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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_gt_bases(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_8gt_bases_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_gt_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_7gt_type_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_gt_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_8gt_depth_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_gt_ref_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_12gt_ref_depth_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_gt_phred_likelihoods(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_20gt_phred_likelihoods_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_gt_alt_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_12gt_alt_depth_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_5_Call_gt_copy_number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_5_Call_14gt_copy_number_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 int __pyx_setprop_5cyvcf_6parser_5_Call_sample(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_5_Call_6sample_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_5_Call_6sample_5__del__(o);
  }
}

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 int __pyx_setprop_5cyvcf_6parser_5_Call_site(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_5_Call_4site_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_5_Call_4site_5__del__(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 int __pyx_setprop_5cyvcf_6parser_5_Call_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_5_Call_4data_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_5_Call_4data_5__del__(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 int __pyx_setprop_5cyvcf_6parser_5_Call_called(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_5_Call_6called_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_5_Call_phased(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_5_Call_6phased_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5cyvcf_6parser__Call[] = {
  {"gt_qual", (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_9gt_qual, METH_NOARGS, __pyx_doc_5cyvcf_6parser_5_Call_8gt_qual},
  {"is_variant", (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_11is_variant, METH_NOARGS, __pyx_doc_5cyvcf_6parser_5_Call_10is_variant},
  {"is_het", (PyCFunction)__pyx_pw_5cyvcf_6parser_5_Call_13is_het, METH_NOARGS, __pyx_doc_5cyvcf_6parser_5_Call_12is_het},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5cyvcf_6parser__Call[] = {
  {(char *)"gt_bases", __pyx_getprop_5cyvcf_6parser_5_Call_gt_bases, 0, 0, 0},
  {(char *)"gt_type", __pyx_getprop_5cyvcf_6parser_5_Call_gt_type, 0, 0, 0},
  {(char *)"gt_depth", __pyx_getprop_5cyvcf_6parser_5_Call_gt_depth, 0, 0, 0},
  {(char *)"gt_ref_depth", __pyx_getprop_5cyvcf_6parser_5_Call_gt_ref_depth, 0, 0, 0},
  {(char *)"gt_phred_likelihoods", __pyx_getprop_5cyvcf_6parser_5_Call_gt_phred_likelihoods, 0, 0, 0},
  {(char *)"gt_alt_depth", __pyx_getprop_5cyvcf_6parser_5_Call_gt_alt_depth, 0, 0, 0},
  {(char *)"gt_copy_number", __pyx_getprop_5cyvcf_6parser_5_Call_gt_copy_number, 0, 0, 0},
  {(char *)"sample", __pyx_getprop_5cyvcf_6parser_5_Call_sample, __pyx_setprop_5cyvcf_6parser_5_Call_sample, 0, 0},
  {(char *)"site", __pyx_getprop_5cyvcf_6parser_5_Call_site, __pyx_setprop_5cyvcf_6parser_5_Call_site, 0, 0},
  {(char *)"data", __pyx_getprop_5cyvcf_6parser_5_Call_data, __pyx_setprop_5cyvcf_6parser_5_Call_data, 0, 0},
  {(char *)"called", __pyx_getprop_5cyvcf_6parser_5_Call_called, __pyx_setprop_5cyvcf_6parser_5_Call_called, 0, 0},
  {(char *)"phased", __pyx_getprop_5cyvcf_6parser_5_Call_phased, __pyx_setprop_5cyvcf_6parser_5_Call_phased, 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)
  "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*/
  " 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*/
  0, /*tp_version_tag*/
  #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->gt_phred_likelihoods = ((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->FORMAT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->REF = 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->gt_phred_likelihoods);
  Py_CLEAR(p->CHROM);
  Py_CLEAR(p->ID);
  Py_CLEAR(p->FORMAT);
  Py_CLEAR(p->REF);
  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->gt_phred_likelihoods) {
    e = (*v)(p->gt_phred_likelihoods, a); if (e) return e;
  }
  if (p->REF) {
    e = (*v)(p->REF, 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->gt_phred_likelihoods);
  p->gt_phred_likelihoods = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->REF);
  p->REF = 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_alleles(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_7alleles_1__get__(o);
}

static int __pyx_setprop_5cyvcf_6parser_7_Record_alleles(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_7alleles_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_7alleles_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_samples(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_7samples_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_7samples_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_ALT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_3ALT_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_3ALT_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_bases(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_8gt_bases_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_types(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_8gt_types_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_phases(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_9gt_phases_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_depths(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_9gt_depths_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_ref_depths(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_13gt_ref_depths_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_alt_depths(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_13gt_alt_depths_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_quals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_8gt_quals_5__del__(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 int __pyx_setprop_5cyvcf_6parser_7_Record_gt_copy_numbers(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_15gt_copy_numbers_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_gt_phred_likelihoods(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_1__get__(o);
}

static int __pyx_setprop_5cyvcf_6parser_7_Record_gt_phred_likelihoods(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_20gt_phred_likelihoods_5__del__(o);
  }
}

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_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_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_REF(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_3REF_1__get__(o);
}

static int __pyx_setprop_5cyvcf_6parser_7_Record_REF(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_3REF_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_3REF_5__del__(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_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_POS(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_3POS_1__get__(o);
}

static int __pyx_setprop_5cyvcf_6parser_7_Record_POS(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_3POS_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_start(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_5start_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_end(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_3end_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_num_hom_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_ref_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_num_het(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_7num_het_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_num_hom_alt(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_11num_hom_alt_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_num_unknown(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_11num_unknown_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_num_called(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_10num_called_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

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 int __pyx_setprop_5cyvcf_6parser_7_Record_INFO(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_7_Record_4INFO_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_7_Record_4INFO_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record__sample_indexes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_15_sample_indexes_1__get__(o);
}

static PyObject *__pyx_getprop_5cyvcf_6parser_7_Record_has_genotypes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_7_Record_13has_genotypes_1__get__(o);
}

static PyMethodDef __pyx_methods_5cyvcf_6parser__Record[] = {
  {"_format_alt", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_7_format_alt, METH_NOARGS, 0},
  {"_format_qual", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_9_format_qual, METH_NOARGS, 0},
  {"_format_info", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_11_format_info, METH_NOARGS, 0},
  {"_format_sample", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_13_format_sample, METH_O, 0},
  {"_stringify", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_15_stringify, METH_VARARGS|METH_KEYWORDS, 0},
  {"_map", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_17_map, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5cyvcf_6parser_7_Record_16_map},
  {"add_format", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_23add_format, METH_O, 0},
  {"add_filter", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_25add_filter, METH_O, 0},
  {"add_info", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_27add_info, METH_VARARGS|METH_KEYWORDS, 0},
  {"genotype", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_29genotype, METH_O, __pyx_doc_5cyvcf_6parser_7_Record_28genotype},
  {"call_rate", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_31call_rate, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_30call_rate},
  {"aaf", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_33aaf, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_32aaf},
  {"nucl_diversity", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_35nucl_diversity, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_34nucl_diversity},
  {"get_hom_refs", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_37get_hom_refs, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_36get_hom_refs},
  {"get_hom_alts", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_39get_hom_alts, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_38get_hom_alts},
  {"get_hets", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_41get_hets, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_40get_hets},
  {"get_unknowns", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_43get_unknowns, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_42get_unknowns},
  {"is_snp", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_45is_snp, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_44is_snp},
  {"is_indel", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_47is_indel, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_46is_indel},
  {"is_sv", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_49is_sv, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_48is_sv},
  {"is_transition", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_51is_transition, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_50is_transition},
  {"is_deletion", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_53is_deletion, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_52is_deletion},
  {"var_type", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_55var_type, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_54var_type},
  {"var_subtype", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_57var_subtype, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_56var_subtype},
  {"sv_end", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_59sv_end, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_58sv_end},
  {"is_sv_precise", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_61is_sv_precise, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_60is_sv_precise},
  {"is_monomorphic", (PyCFunction)__pyx_pw_5cyvcf_6parser_7_Record_63is_monomorphic, METH_NOARGS, __pyx_doc_5cyvcf_6parser_7_Record_62is_monomorphic},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5cyvcf_6parser__Record[] = {
  {(char *)"alleles", __pyx_getprop_5cyvcf_6parser_7_Record_alleles, __pyx_setprop_5cyvcf_6parser_7_Record_alleles, 0, 0},
  {(char *)"samples", __pyx_getprop_5cyvcf_6parser_7_Record_samples, __pyx_setprop_5cyvcf_6parser_7_Record_samples, 0, 0},
  {(char *)"ALT", __pyx_getprop_5cyvcf_6parser_7_Record_ALT, __pyx_setprop_5cyvcf_6parser_7_Record_ALT, 0, 0},
  {(char *)"gt_bases", __pyx_getprop_5cyvcf_6parser_7_Record_gt_bases, __pyx_setprop_5cyvcf_6parser_7_Record_gt_bases, 0, 0},
  {(char *)"gt_types", __pyx_getprop_5cyvcf_6parser_7_Record_gt_types, __pyx_setprop_5cyvcf_6parser_7_Record_gt_types, 0, 0},
  {(char *)"gt_phases", __pyx_getprop_5cyvcf_6parser_7_Record_gt_phases, __pyx_setprop_5cyvcf_6parser_7_Record_gt_phases, 0, 0},
  {(char *)"gt_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_depths, __pyx_setprop_5cyvcf_6parser_7_Record_gt_depths, 0, 0},
  {(char *)"gt_ref_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_ref_depths, __pyx_setprop_5cyvcf_6parser_7_Record_gt_ref_depths, 0, 0},
  {(char *)"gt_alt_depths", __pyx_getprop_5cyvcf_6parser_7_Record_gt_alt_depths, __pyx_setprop_5cyvcf_6parser_7_Record_gt_alt_depths, 0, 0},
  {(char *)"gt_quals", __pyx_getprop_5cyvcf_6parser_7_Record_gt_quals, __pyx_setprop_5cyvcf_6parser_7_Record_gt_quals, 0, 0},
  {(char *)"gt_copy_numbers", __pyx_getprop_5cyvcf_6parser_7_Record_gt_copy_numbers, __pyx_setprop_5cyvcf_6parser_7_Record_gt_copy_numbers, 0, 0},
  {(char *)"gt_phred_likelihoods", __pyx_getprop_5cyvcf_6parser_7_Record_gt_phred_likelihoods, __pyx_setprop_5cyvcf_6parser_7_Record_gt_phred_likelihoods, 0, 0},
  {(char *)"CHROM", __pyx_getprop_5cyvcf_6parser_7_Record_CHROM, 0, 0, 0},
  {(char *)"ID", __pyx_getprop_5cyvcf_6parser_7_Record_ID, 0, 0, 0},
  {(char *)"FORMAT", __pyx_getprop_5cyvcf_6parser_7_Record_FORMAT, 0, 0, 0},
  {(char *)"REF", __pyx_getprop_5cyvcf_6parser_7_Record_REF, __pyx_setprop_5cyvcf_6parser_7_Record_REF, 0, 0},
  {(char *)"FILTER", __pyx_getprop_5cyvcf_6parser_7_Record_FILTER, 0, 0, 0},
  {(char *)"QUAL", __pyx_getprop_5cyvcf_6parser_7_Record_QUAL, 0, 0, 0},
  {(char *)"POS", __pyx_getprop_5cyvcf_6parser_7_Record_POS, __pyx_setprop_5cyvcf_6parser_7_Record_POS, 0, 0},
  {(char *)"start", __pyx_getprop_5cyvcf_6parser_7_Record_start, __pyx_setprop_5cyvcf_6parser_7_Record_start, 0, 0},
  {(char *)"end", __pyx_getprop_5cyvcf_6parser_7_Record_end, __pyx_setprop_5cyvcf_6parser_7_Record_end, 0, 0},
  {(char *)"num_hom_ref", __pyx_getprop_5cyvcf_6parser_7_Record_num_hom_ref, __pyx_setprop_5cyvcf_6parser_7_Record_num_hom_ref, 0, 0},
  {(char *)"num_het", __pyx_getprop_5cyvcf_6parser_7_Record_num_het, __pyx_setprop_5cyvcf_6parser_7_Record_num_het, 0, 0},
  {(char *)"num_hom_alt", __pyx_getprop_5cyvcf_6parser_7_Record_num_hom_alt, __pyx_setprop_5cyvcf_6parser_7_Record_num_hom_alt, 0, 0},
  {(char *)"num_unknown", __pyx_getprop_5cyvcf_6parser_7_Record_num_unknown, __pyx_setprop_5cyvcf_6parser_7_Record_num_unknown, 0, 0},
  {(char *)"num_called", __pyx_getprop_5cyvcf_6parser_7_Record_num_called, __pyx_setprop_5cyvcf_6parser_7_Record_num_called, 0, 0},
  {(char *)"INFO", __pyx_getprop_5cyvcf_6parser_7_Record_INFO, __pyx_setprop_5cyvcf_6parser_7_Record_INFO, 0, 0},
  {(char *)"_sample_indexes", __pyx_getprop_5cyvcf_6parser_7_Record__sample_indexes, 0, 0, 0},
  {(char *)"has_genotypes", __pyx_getprop_5cyvcf_6parser_7_Record_has_genotypes, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5cyvcf_6parser__Record = {
  PyVarObject_HEAD_INIT(0, 0)
  "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*/
  " 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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_5cyvcf_6parser_Reader __pyx_vtable_5cyvcf_6parser_Reader;

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->__pyx_vtab = __pyx_vtabptr_5cyvcf_6parser_Reader;
  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->samp_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->samples = ((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->samp_data);
  Py_CLEAR(p->samples);
  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->samp_data) {
    e = (*v)(p->samp_data, a); if (e) return e;
  }
  if (p->samples) {
    e = (*v)(p->samples, 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->samp_data);
  p->samp_data = ((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->_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_raw_header(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_10raw_header_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 int __pyx_setprop_5cyvcf_6parser_6Reader_metadata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_8metadata_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_8metadata_5__del__(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 int __pyx_setprop_5cyvcf_6parser_6Reader_infos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_5infos_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_5infos_5__del__(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 int __pyx_setprop_5cyvcf_6parser_6Reader_filters(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_7filters_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_7filters_5__del__(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 int __pyx_setprop_5cyvcf_6parser_6Reader_formats(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_7formats_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_7formats_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader__sample_indexes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_15_sample_indexes_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 int __pyx_setprop_5cyvcf_6parser_6Reader_samples(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_7samples_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_7samples_5__del__(o);
  }
}

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 int __pyx_setprop_5cyvcf_6parser_6Reader_filename(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_8filename_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_8filename_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5cyvcf_6parser_6Reader_curr_record(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_1__get__(o);
}

static int __pyx_setprop_5cyvcf_6parser_6Reader_curr_record(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_3__set__(o, v);
  }
  else {
    return __pyx_pw_5cyvcf_6parser_6Reader_11curr_record_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5cyvcf_6parser_Reader[] = {
  {"seek", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_5seek, METH_O, 0},
  {"tell", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_7tell, METH_NOARGS, 0},
  {"_parse_metainfo", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_9_parse_metainfo, METH_NOARGS, __pyx_doc_5cyvcf_6parser_6Reader_8_parse_metainfo},
  {"_parse_info", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_11_parse_info, METH_O, __pyx_doc_5cyvcf_6parser_6Reader_10_parse_info},
  {"_parse_samples", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_13_parse_samples, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5cyvcf_6parser_6Reader_12_parse_samples},
  {"_parse_sample", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_15_parse_sample, METH_VARARGS|METH_KEYWORDS, 0},
  {"__next__", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_17__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5cyvcf_6parser_6Reader_16__next__},
  {"_update_genotype_info", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_19_update_genotype_info, METH_VARARGS|METH_KEYWORDS, 0},
  {"parse", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_21parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5cyvcf_6parser_6Reader_20parse},
  {"fetch", (PyCFunction)__pyx_pw_5cyvcf_6parser_6Reader_23fetch, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5cyvcf_6parser_6Reader_22fetch},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5cyvcf_6parser_Reader[] = {
  {(char *)"raw_header", __pyx_getprop_5cyvcf_6parser_6Reader_raw_header, 0, __pyx_k_Dump_the_raw_unparsed_header_lin, 0},
  {(char *)"metadata", __pyx_getprop_5cyvcf_6parser_6Reader_metadata, __pyx_setprop_5cyvcf_6parser_6Reader_metadata, 0, 0},
  {(char *)"infos", __pyx_getprop_5cyvcf_6parser_6Reader_infos, __pyx_setprop_5cyvcf_6parser_6Reader_infos, 0, 0},
  {(char *)"filters", __pyx_getprop_5cyvcf_6parser_6Reader_filters, __pyx_setprop_5cyvcf_6parser_6Reader_filters, 0, 0},
  {(char *)"formats", __pyx_getprop_5cyvcf_6parser_6Reader_formats, __pyx_setprop_5cyvcf_6parser_6Reader_formats, 0, 0},
  {(char *)"_sample_indexes", __pyx_getprop_5cyvcf_6parser_6Reader__sample_indexes, 0, 0, 0},
  {(char *)"samples", __pyx_getprop_5cyvcf_6parser_6Reader_samples, __pyx_setprop_5cyvcf_6parser_6Reader_samples, 0, 0},
  {(char *)"filename", __pyx_getprop_5cyvcf_6parser_6Reader_filename, __pyx_setprop_5cyvcf_6parser_6Reader_filename, 0, 0},
  {(char *)"curr_record", __pyx_getprop_5cyvcf_6parser_6Reader_curr_record, __pyx_setprop_5cyvcf_6parser_6Reader_curr_record, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5cyvcf_6parser_Reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "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*/
  " 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_17__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*/
  0, /*tp_version_tag*/
  #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)
  "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*/
  0, /*tp_version_tag*/
  #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)
  "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*/
  0, /*tp_version_tag*/
  #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)
  "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*/
  0, /*tp_version_tag*/
  #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)
  "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*/
  0, /*tp_version_tag*/
  #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
    "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_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0},
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
  {&__pyx_n_b_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 0, 1},
  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
  {&__pyx_n_s_AA, __pyx_k_AA, sizeof(__pyx_k_AA), 0, 0, 1, 1},
  {&__pyx_n_s_AC, __pyx_k_AC, sizeof(__pyx_k_AC), 0, 0, 1, 1},
  {&__pyx_n_s_AD, __pyx_k_AD, sizeof(__pyx_k_AD), 0, 0, 1, 1},
  {&__pyx_n_s_AF, __pyx_k_AF, sizeof(__pyx_k_AF), 0, 0, 1, 1},
  {&__pyx_n_s_ALT, __pyx_k_ALT, sizeof(__pyx_k_ALT), 0, 0, 1, 1},
  {&__pyx_n_s_AN, __pyx_k_AN, sizeof(__pyx_k_AN), 0, 0, 1, 1},
  {&__pyx_n_s_AO, __pyx_k_AO, sizeof(__pyx_k_AO), 0, 0, 1, 1},
  {&__pyx_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_b_Character, __pyx_k_Character, sizeof(__pyx_k_Character), 0, 0, 0, 1},
  {&__pyx_n_s_DB, __pyx_k_DB, sizeof(__pyx_k_DB), 0, 0, 1, 1},
  {&__pyx_n_s_DP, __pyx_k_DP, sizeof(__pyx_k_DP), 0, 0, 1, 1},
  {&__pyx_n_s_END, __pyx_k_END, sizeof(__pyx_k_END), 0, 0, 1, 1},
  {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
  {&__pyx_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_PL, __pyx_k_PL, sizeof(__pyx_k_PL), 0, 0, 1, 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__format_sample_locals_gen, __pyx_k_Writer__format_sample_locals_gen, sizeof(__pyx_k_Writer__format_sample_locals_gen), 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__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0},
  {&__pyx_kp_b__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 0, 0},
  {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 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__51, __pyx_k__51, sizeof(__pyx_k__51), 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_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_sample_locals_genexpr, __pyx_k_format_sample_locals_genexpr, sizeof(__pyx_k_format_sample_locals_genexpr), 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_phred_likelihoods, __pyx_k_gt_phred_likelihoods, sizeof(__pyx_k_gt_phred_likelihoods), 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, __pyx_k_parse, sizeof(__pyx_k_parse), 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_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__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_round, __pyx_k_round, sizeof(__pyx_k_round), 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_sample_info, __pyx_k_sample_info, sizeof(__pyx_k_sample_info), 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_set_self, __pyx_k_set_self, sizeof(__pyx_k_set_self), 0, 0, 1, 1},
  {&__pyx_n_s_site, __pyx_k_site, sizeof(__pyx_k_site), 0, 0, 1, 1},
  {&__pyx_n_s_snp, __pyx_k_snp, sizeof(__pyx_k_snp), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_n_s_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_genotype_info, __pyx_k_update_genotype_info, sizeof(__pyx_k_update_genotype_info), 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, __pyx_k_var, sizeof(__pyx_k_var), 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 = 49; __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 = 309; __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 = 52; __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 = 75; __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 = 82; __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 = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __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 = 481; __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 = 746; __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 = 751; __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 = 834; __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 = 860; __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 = 860; __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 = 1117; __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 = 1154; __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":69
 *             Description="(?P<desc>.*)"
 *             >''', re.VERBOSE)
 *         self.meta_pattern = re.compile(r'''##(?P<key>.+)=(?P<val>.+)''')             # <<<<<<<<<<<<<<
 * 
 *     def read_info(self, info_string):
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_P_key_P_val); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "cyvcf/parser.pyx":79
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_number); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cyvcf/parser.pyx":85
 *             num = None
 * 
 *         info = _Info(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                      match.group('type'), match.group('desc'))
 * 
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "cyvcf/parser.pyx":86
 * 
 *         info = _Info(match.group('id'), num,
 *                      match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), info)
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_type); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cyvcf/parser.pyx":88
 *                      match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), info)             # <<<<<<<<<<<<<<
 * 
 *     def read_filter(self, filter_string):
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "cyvcf/parser.pyx":97
 *                 "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__8 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cyvcf/parser.pyx":99
 *         filt = _Filter(match.group('id'), match.group('desc'))
 * 
 *         return (match.group('id'), filt)             # <<<<<<<<<<<<<<
 * 
 *     def read_format(self, format_string):
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cyvcf/parser.pyx":109
 * 
 *         try:
 *             num = int(match.group('number'))             # <<<<<<<<<<<<<<
 *             if num < 0:
 *                 num = None
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_number); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cyvcf/parser.pyx":115
 *             num = None
 * 
 *         form = _Format(match.group('id'), num,             # <<<<<<<<<<<<<<
 *                        match.group('type'), match.group('desc'))
 * 
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_id); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "cyvcf/parser.pyx":116
 * 
 *         form = _Format(match.group('id'), num,
 *                        match.group('type'), match.group('desc'))             # <<<<<<<<<<<<<<
 * 
 *         return (match.group('id'), form)
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_type); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_desc); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cyvcf/parser.pyx":118
 *                        match.group('type'), match.group('desc'))
 * 
 *         return (match.group('id'), form)             # <<<<<<<<<<<<<<
 * 
 *     def read_meta(self, meta_string):
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_id); 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);

  /* "cyvcf/parser.pyx":122
 *     def read_meta(self, meta_string):
 *         match = self.meta_pattern.match(meta_string)
 *         return match.group('key'), match.group('val')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_key); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "cyvcf/parser.pyx":148
 *         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__19 = PyTuple_Pack(1, __pyx_kp_s__18); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "cyvcf/parser.pyx":185
 *                                             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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cyvcf/parser.pyx":457
 *         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 = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cyvcf/parser.pyx":690
 *             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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "cyvcf/parser.pyx":746
 * 
 *         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 = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cyvcf/parser.pyx":760
 *             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 = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "cyvcf/parser.pyx":806
 * 
 *         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 = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "cyvcf/parser.pyx":808
 *         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 = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cyvcf/parser.pyx":810
 *             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 = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cyvcf/parser.pyx":814
 *                 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 = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "cyvcf/parser.pyx":818
 *                 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 = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cyvcf/parser.pyx":828
 *             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 = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cyvcf/parser.pyx":832
 *             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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__42);
  __Pyx_GIVEREF(__pyx_slice__42);

  /* "cyvcf/parser.pyx":836
 *             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 = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cyvcf/parser.pyx":852
 *             return {}
 * 
 *         cdef list entries = info_str.split(';')             # <<<<<<<<<<<<<<
 *         cdef dict retdict = {}
 * 
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cyvcf/parser.pyx":861
 *         # 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 = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cyvcf/parser.pyx":887
 *             """
 *             if entry_type == b'Integer':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 try:
 *                     val = _map(int, vals)
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "cyvcf/parser.pyx":893
 *                     val = _map(float, vals)
 *             elif entry_type == b'Float':
 *                 vals = entry[1].split(',')             # <<<<<<<<<<<<<<
 *                 val = _map(float, vals)
 *             elif entry_type == b'Flag':
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cyvcf/parser.pyx":919
 *         '''Parse a sample entry according to the format specified in the FORMAT
 *         column.'''
 *         cdef list samp_fmt = samp_fmt_s.split(':')             # <<<<<<<<<<<<<<
 *         cdef int n = len(samp_fmt)
 *         cdef list samp_fmt_types = [None] * n
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cyvcf/parser.pyx":1023
 *         # 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__50 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cyvcf/parser.pyx":1048
 * 
 * 
 *             lvals = vals.split(',')             # <<<<<<<<<<<<<<
 * 
 *             if entry_type == 'Integer':
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cyvcf/parser.pyx":1087
 *         '''Return the next record in the file.'''
 *         cdef list row
 *         row = line.split('\t')             # <<<<<<<<<<<<<<
 * 
 *         #CHROM
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s__28); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cyvcf/parser.pyx":1100
 *         cdef bytes ref = row[3]
 *         #ALT
 *         cdef list alt = self._map(str, row[4].split(','))             # <<<<<<<<<<<<<<
 *         #QUAL
 *         cdef object qual
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cyvcf/parser.pyx":1108
 *             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__55 = PyTuple_Pack(1, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cyvcf/parser.pyx":1136
 *         """
 *         if not pysam:
 *             raise Exception('pysam not available, try "pip install pysam"?')             # <<<<<<<<<<<<<<
 * 
 *         if not self.filename:
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_pysam_not_available_try_pip_inst); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cyvcf/parser.pyx":1139
 * 
 *         if not self.filename:
 *             raise Exception('Please provide a filename (or a "normal" fsock)')             # <<<<<<<<<<<<<<
 * 
 *         if not self._tabix:
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_Please_provide_a_filename_or_a_n); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cyvcf/parser.pyx":1144
 *             self._tabix = pysam.Tabixfile(self.filename)
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':             # <<<<<<<<<<<<<<
 *             chrom = chrom[3:]
 * 
 */
  __pyx_slice__58 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__58);
  __Pyx_GIVEREF(__pyx_slice__58);

  /* "cyvcf/parser.pyx":1145
 * 
 *         if self._prepend_chr and chrom[:3] == 'chr':
 *             chrom = chrom[3:]             # <<<<<<<<<<<<<<
 * 
 *         # not sure why tabix needs position -1
 */
  __pyx_slice__59 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__59);
  __Pyx_GIVEREF(__pyx_slice__59);

  /* "cyvcf/parser.pyx":1207
 *         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__60 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cyvcf/parser.pyx":1221
 * def __update_readme():
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)             # <<<<<<<<<<<<<<
 * 
 * # backwards compatibility
 */
  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_kp_s_README_rst, __pyx_n_s_w); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "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__62 = PyTuple_Pack(2, __pyx_n_s_SampleInfo_2, __pyx_kp_s_samples_gt_bases_gt_types_gt_pha); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "cyvcf/parser.pyx":51
 * 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__63 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_init, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":71
 *         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__65 = 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__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_info, 71, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":90
 *         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__67 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filter_string, __pyx_n_s_match, __pyx_n_s_filt); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_filter, 90, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":101
 *         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__69 = 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__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_format, 101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":120
 *         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__71 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_meta_string, __pyx_n_s_match); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_read_meta, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1166
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.stream = stream
 *         self.writer = csv.writer(stream, delimiter="\t")
 */
  __pyx_tuple__73 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_template, __pyx_n_s_line); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_init, 1166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1182
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_write_header, 1182, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1186
 *         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__77 = 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__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_write_record, 1186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1196
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */
  __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_alt, __pyx_n_s_x); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_format_alt, 1196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1199
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */
  __pyx_tuple__81 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_info, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_format_info, 1199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1204
 *         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__83 = 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__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_format_sample, 1204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1209
 *         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__85 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_none); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_stringify, 1209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__87 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_)); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "cyvcf/parser.pyx":1214
 *         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__88 = 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__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(4, 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_map, 1214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__90 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_)); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "cyvcf/parser.pyx":1219
 *                 for x in iterable]
 * 
 * def __update_readme():             # <<<<<<<<<<<<<<
 *     import sys, vcf
 *     file('README.rst', 'w').write(vcf.__doc__)
 */
  __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_s_sys, __pyx_n_s_vcf); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_arq5x_Documents_SourceCod, __pyx_n_s_update_readme, 1219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __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;}
  __pyx_int_neg_10 = PyInt_FromLong(-10); if (unlikely(!__pyx_int_neg_10)) {__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;
  Py_ssize_t __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_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("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_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 (PyObject_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 (PyObject_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 = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser__Call.tp_print = 0;
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5cyvcf_6parser__Call, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __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 (PyObject_SetAttrString(__pyx_m, "_Call", (PyObject *)&__pyx_type_5cyvcf_6parser__Call) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser__Record.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "_Record", (PyObject *)&__pyx_type_5cyvcf_6parser__Record) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cyvcf_6parser__Record = &__pyx_type_5cyvcf_6parser__Record;
  __pyx_vtabptr_5cyvcf_6parser_Reader = &__pyx_vtable_5cyvcf_6parser_Reader;
  __pyx_vtable_5cyvcf_6parser_Reader._map = (PyObject *(*)(struct __pyx_obj_5cyvcf_6parser_Reader *, PyObject *, PyObject *, struct __pyx_opt_args_5cyvcf_6parser_6Reader__map *__pyx_optional_args))__pyx_f_5cyvcf_6parser_6Reader__map;
  __pyx_vtable_5cyvcf_6parser_Reader._parse_sample = (PyObject *(*)(struct __pyx_obj_5cyvcf_6parser_Reader *, char *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5cyvcf_6parser_6Reader__parse_sample;
  if (PyType_Ready(&__pyx_type_5cyvcf_6parser_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5cyvcf_6parser_Reader.tp_print = 0;
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5cyvcf_6parser_Reader, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __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 = PyObject_GetAttrString((PyObject *)&__pyx_type_5cyvcf_6parser_Reader, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_5cyvcf_6parser_6Reader_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_5cyvcf_6parser_6Reader_16__next__.doc = __pyx_doc_5cyvcf_6parser_6Reader_16__next__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5cyvcf_6parser_6Reader_16__next__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_5cyvcf_6parser_Reader.tp_dict, __pyx_vtabptr_5cyvcf_6parser_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Reader", (PyObject *)&__pyx_type_5cyvcf_6parser_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __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 = 454; __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 = 457; __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 = 1204; __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 = 1207; __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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); 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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_namedtuple); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyList_New(4); 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_INCREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_num);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_num);
  __Pyx_GIVEREF(__pyx_n_s_num);
  __Pyx_INCREF(__pyx_n_s_type);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_type);
  __Pyx_GIVEREF(__pyx_n_s_type);
  __Pyx_INCREF(__pyx_n_s_desc);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_desc);
  __Pyx_GIVEREF(__pyx_n_s_desc);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_9 = 1;
    }
  }
  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (__pyx_t_8) {
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
  }
  __Pyx_INCREF(__pyx_n_s_Info_2);
  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_n_s_Info_2);
  __Pyx_GIVEREF(__pyx_n_s_Info_2);
  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, 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_10); __pyx_t_10 = 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); 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_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(2); 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_INCREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_desc);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_desc);
  __Pyx_GIVEREF(__pyx_n_s_desc);
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_9 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_6) {
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(__pyx_n_s_Filter_2);
  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_n_s_Filter_2);
  __Pyx_GIVEREF(__pyx_n_s_Filter_2);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, 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_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_10, 0, __pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_num);
  PyList_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_num);
  __Pyx_GIVEREF(__pyx_n_s_num);
  __Pyx_INCREF(__pyx_n_s_type);
  PyList_SET_ITEM(__pyx_t_10, 2, __pyx_n_s_type);
  __Pyx_GIVEREF(__pyx_n_s_type);
  __Pyx_INCREF(__pyx_n_s_desc);
  PyList_SET_ITEM(__pyx_t_10, 3, __pyx_n_s_desc);
  __Pyx_GIVEREF(__pyx_n_s_desc);
  __pyx_t_1 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_9); 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);
  if (__pyx_t_1) {
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
  }
  __Pyx_INCREF(__pyx_n_s_Format_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_n_s_Format_2);
  __Pyx_GIVEREF(__pyx_n_s_Format_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, 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_8); __pyx_t_8 = 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_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__62, 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_8); __pyx_t_8 = 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":40
 * 
 * 
 * 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 = 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_HET, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":42
 * 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 = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":43
 * HET = 1
 * HOM_ALT = 3
 * UNKNOWN = 2             # <<<<<<<<<<<<<<
 * 
 * cdef inline list _map(func, list iterable, char *bad='.'):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNKNOWN, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":49
 *     return [func(x) if x != bad else None for x in iterable]
 * 
 * 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 = 49; __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_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __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 = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "cyvcf/parser.pyx":51
 * 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_10 = __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, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":71
 *         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_10 = __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, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_info, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":90
 *         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_10 = __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, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_filter, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":101
 *         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_10 = __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, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_format, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":120
 *         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_10 = __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, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_read_meta, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":49
 *     return [func(x) if x != bad else None for x in iterable]
 * 
 * class _vcf_metadata_parser(object):             # <<<<<<<<<<<<<<
 *     '''Parse the metadat in the header of a VCF file.'''
 *     def __init__(self):
 */
  __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_n_s_vcf_metadata_parser, __pyx_t_7, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vcf_metadata_parser, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":310
 * 
 *     @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 = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":309
 *                 return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gt_qual(self):
 *         '''The PHRED-scaled quality of genotype
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 310; __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":338
 * 
 *     @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 = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":337
 *                 return -1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_variant(self):
 *         """ Return True if not a reference call """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 338; __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":345
 * 
 *     @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 = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":344
 *         return self.gt_type != HOM_REF
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_het(self):
 *         """ Return True for heterozygous calls """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 345; __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":504
 * 
 *     @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 = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":503
 *         return self.samples[self._sample_indexes[name]]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def call_rate(self):
 *         """ The fraction of genotypes that were actually called. """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 504; __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":509
 * 
 *     @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 = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":508
 *         return float(self.num_called) / float(len(self.samples))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def aaf(self):
 *         """ The allele frequency of the alternate allele.
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 509; __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":527
 * 
 *     @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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":526
 *             return float(het + 2*hom_alt)/float(num_chroms)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nucl_diversity(self):
 *         """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 527; __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":563
 * 
 *     @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 = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":562
 *         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_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 563; __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":572
 * 
 *     @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 = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":571
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_indel(self):
 *         """ Return whether or not the variant is an INDEL """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 572; __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":591
 * 
 *     @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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":590
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_sv(self):
 *         """ Return whether or not the variant is a structural variant """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":598
 * 
 *     @property
 *     def 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 = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":597
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_transition(self):
 *         """ Return whether or not the SNP is a transition """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_5cyvcf_6parser__Record);

  /* "cyvcf/parser.pyx":615
 * 
 *     @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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":614
 *         else: return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_deletion(self):
 *         """ Return whether or not the INDEL is a deletion """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 615; __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":631
 * 
 *     @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 = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":630
 *         else: return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def var_type(self):
 *         """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 631; __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":646
 * 
 *     @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 = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":645
 *             return "unknown"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def var_subtype(self):
 *         """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 646; __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":695
 * 
 *     @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 = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":694
 *             return "unknown"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sv_end(self):
 *         """ Return the end position for the SV """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 695; __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":702
 * 
 *     @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 = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":701
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_sv_precise(self):
 *         """ Return whether the SV cordinates are mapped
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 702; __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":714
 * 
 *     @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 = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "cyvcf/parser.pyx":713
 *             return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_monomorphic(self):
 *         """ Return True for reference calls """
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 714; __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":1161
 * 
 * 
 * class Writer(object):             # <<<<<<<<<<<<<<
 *     """ VCF Writer """
 * 
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __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_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __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 = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "cyvcf/parser.pyx":1164
 *     """ VCF Writer """
 * 
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, stream, template):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_CHROM_POS_ID_REF_ALT_QUAL_FILTE, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_11) {
    __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_fixed_fields, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1166
 *     fixed_fields = "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT".split()
 * 
 *     def __init__(self, stream, template):             # <<<<<<<<<<<<<<
 *         self.stream = stream
 *         self.writer = csv.writer(stream, delimiter="\t")
 */
  __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_1__init__, 0, __pyx_n_s_Writer___init, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1182
 *         self._write_header()
 * 
 *     def _write_header(self):             # <<<<<<<<<<<<<<
 *         # TODO: write INFO, etc
 *         self.writer.writerow(self.fixed_fields + self.template.samples)
 */
  __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_3_write_header, 0, __pyx_n_s_Writer__write_header, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_write_header, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1186
 *         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_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_5write_record, 0, __pyx_n_s_Writer_write_record, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_write_record, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1196
 *         self.writer.writerow(ffs + samples)
 * 
 *     def _format_alt(self, alt):             # <<<<<<<<<<<<<<
 *         return ','.join([x or '.' for x in alt])
 * 
 */
  __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_7_format_alt, 0, __pyx_n_s_Writer__format_alt, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_format_alt, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1199
 *         return ','.join([x or '.' for x in alt])
 * 
 *     def _format_info(self, info):             # <<<<<<<<<<<<<<
 *         if not info:
 *             return '.'
 */
  __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_9_format_info, 0, __pyx_n_s_Writer__format_info, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_format_info, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1204
 *         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_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_11_format_sample, 0, __pyx_n_s_Writer__format_sample, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_format_sample, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1209
 *         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_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_13_stringify, 0, __pyx_n_s_Writer__stringify, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__87);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_stringify, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1214
 *         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_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5cyvcf_6parser_6Writer_15_map, 0, __pyx_n_s_Writer__map, NULL, __pyx_n_s_cyvcf_parser, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__90);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_map, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cyvcf/parser.pyx":1161
 * 
 * 
 * class Writer(object):             # <<<<<<<<<<<<<<
 *     """ VCF Writer """
 * 
 */
  __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_n_s_Writer, __pyx_t_7, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Writer, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1219
 *                 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 = 1219; __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 = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cyvcf/parser.pyx":1224
 * 
 * # 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 = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cyvcf/parser.pyx":1225
 * # 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 = 1225; __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 = 1225; __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;

  /*--- Wrapped vars code ---*/

  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_10);
  __Pyx_XDECREF(__pyx_t_11);
  if (__pyx_m) {
    if (__pyx_d) {
      __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

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

#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 (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject* args = PyTuple_Pack(1, arg);
    return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
}
#endif

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(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_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#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 (PyType_Check(type)) {
#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;
        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;
        }
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
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) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(tmp_type, tmp_value, tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        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);
        }
#endif
    }
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_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 (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        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 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));
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

#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 PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

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

static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_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 -1;
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

#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 int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

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;
    }
    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}
};
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[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
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;
    __Pyx_CyFunction_weakreflist(op) = 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 (__Pyx_CyFunction_weakreflist(m) != 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 __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_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 (%" CYTHON_FORMAT_SSIZE_T "d 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 (%" CYTHON_FORMAT_SSIZE_T "d 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)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_Call,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#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 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,
        0,
        0,
        0,
        0,
        __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,
        __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;
    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_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*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 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_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;
        }
        #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
        }
    }
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_value)       \
    {                                                                     \
        func_type value = func_value;                                     \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                if (is_unsigned && unlikely(value < zero))                \
                    goto raise_neg_overflow;                              \
                else                                                      \
                    goto raise_overflow;                                  \
            }                                                             \
        }                                                                 \
        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(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            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
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x))
            }
        }
        {
#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;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

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

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(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            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
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x))
            }
        }
        {
#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;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

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
        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
        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)
        PyErr_SetNone(PyExc_GeneratorExit);
    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
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        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 (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;
        }
        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);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    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;
        }
        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
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        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);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Generator_get_name(__pyx_GeneratorObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Generator_set_name(__pyx_GeneratorObject *self, 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 = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Generator_get_qualname(__pyx_GeneratorObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Generator_set_qualname(__pyx_GeneratorObject *self, 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 = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_GeneratorObject),
    0,
    (destructor) __Pyx_Generator_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Generator_traverse,
    0,
    0,
    offsetof(__pyx_GeneratorObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Generator_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Generator_del,
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure, PyObject *name, PyObject *qualname) {
    __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;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    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);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

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
        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
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_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
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if !CYTHON_COMPILING_IN_PYPY
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#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;
}
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
    return PyLong_AsSsize_t(b);
  }
  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) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
