Merge commit 'upstream/0.6'
authorDiane Trout <diane@caltech.edu>
Wed, 14 Dec 2011 01:03:38 +0000 (17:03 -0800)
committerDiane Trout <diane@caltech.edu>
Wed, 14 Dec 2011 01:03:38 +0000 (17:03 -0800)
Delete files generated by cython.

Conflicts:
pysam/csamtools.c
pysam/ctabix.c

53 files changed:
PKG-INFO
pysam.egg-info/PKG-INFO
pysam.egg-info/SOURCES.txt
pysam/TabProxies.c
pysam/TabProxies.pxd
pysam/TabProxies.pyx
pysam/VCF.py [deleted file]
pysam/__init__.py
pysam/csamtools.pxd
pysam/csamtools.pyx
pysam/ctabix.pxd
pysam/ctabix.pyx
pysam/cvcf.c
pysam/pysam_util.c
pysam/pysam_util.h
pysam/version.py
samtools/bam.c.pysam.c
samtools/bam.h
samtools/bam2bcf.c.pysam.c
samtools/bam2bcf.h
samtools/bam2bcf_indel.c.pysam.c
samtools/bam_aux.c.pysam.c
samtools/bam_import.c.pysam.c
samtools/bam_index.c.pysam.c
samtools/bam_maqcns.c.pysam.c [deleted file]
samtools/bam_maqcns.h [deleted file]
samtools/bam_md.c.pysam.c
samtools/bam_pileup.c.pysam.c
samtools/bam_plcmd.c.pysam.c
samtools/bam_reheader.c.pysam.c [new file with mode: 0644]
samtools/bam_tview.c.pysam.c
samtools/bcftools/bcf.h
samtools/bcftools/bcfutils.c.pysam.c
samtools/bcftools/call1.c.pysam.c
samtools/bcftools/em.c.pysam.c
samtools/bcftools/mut.c.pysam.c [new file with mode: 0644]
samtools/bcftools/prob1.c.pysam.c
samtools/bcftools/prob1.h
samtools/bedidx.c.pysam.c
samtools/faidx.c.pysam.c
samtools/glf.c.pysam.c [deleted file]
samtools/glf.h [deleted file]
samtools/kprobaln.c.pysam.c
samtools/kseq.h
samtools/misc/seqtk.c.pysam.c [new file with mode: 0644]
samtools/msvc_compat.h [deleted file]
samtools/sam_view.c.pysam.c
samtools/sample.c.pysam.c
setup.py
tabix/msvc_compat.h [deleted file]
tests/example.py
tests/pysam_test.py
tests/tabix_test.py

index c90139fb55ade84c9847aff21305dc3f8301070c..99d7ae966b891d802a6415d3d178fc92a79a4211 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysam
-Version: 0.5
+Version: 0.6
 Summary: pysam
 Home-page: http://code.google.com/p/pysam/
 Author: Andreas Heger
index c90139fb55ade84c9847aff21305dc3f8301070c..99d7ae966b891d802a6415d3d178fc92a79a4211 100644 (file)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysam
-Version: 0.5
+Version: 0.6
 Summary: pysam
 Home-page: http://code.google.com/p/pysam/
 Author: Andreas Heger
index 6f8ca43c3ff766feb62846754803ec4f991333db..45bcda92e7a5771b41a9988695e116d1aa7ea0ba 100644 (file)
@@ -10,7 +10,6 @@ pysam/Pileup.py
 pysam/TabProxies.c
 pysam/TabProxies.pxd
 pysam/TabProxies.pyx
-pysam/VCF.py
 pysam/__init__.py
 pysam/csamtools.c
 pysam/csamtools.pxd
@@ -45,12 +44,11 @@ samtools/bam_endian.h
 samtools/bam_import.c.pysam.c
 samtools/bam_index.c.pysam.c
 samtools/bam_lpileup.c.pysam.c
-samtools/bam_maqcns.c.pysam.c
-samtools/bam_maqcns.h
 samtools/bam_mate.c.pysam.c
 samtools/bam_md.c.pysam.c
 samtools/bam_pileup.c.pysam.c
 samtools/bam_plcmd.c.pysam.c
+samtools/bam_reheader.c.pysam.c
 samtools/bam_rmdup.c.pysam.c
 samtools/bam_rmdupse.c.pysam.c
 samtools/bam_sort.c.pysam.c
@@ -64,8 +62,6 @@ samtools/errmod.c.pysam.c
 samtools/errmod.h
 samtools/faidx.c.pysam.c
 samtools/faidx.h
-samtools/glf.c.pysam.c
-samtools/glf.h
 samtools/kaln.c.pysam.c
 samtools/kaln.h
 samtools/khash.h
@@ -78,7 +74,6 @@ samtools/kseq.h
 samtools/ksort.h
 samtools/kstring.c.pysam.c
 samtools/kstring.h
-samtools/msvc_compat.h
 samtools/phase.c.pysam.c
 samtools/pysam.h
 samtools/razf.c.pysam.c
@@ -101,11 +96,13 @@ samtools/bcftools/index.c.pysam.c
 samtools/bcftools/kfunc.c.pysam.c
 samtools/bcftools/kmin.c.pysam.c
 samtools/bcftools/kmin.h
+samtools/bcftools/mut.c.pysam.c
 samtools/bcftools/prob1.c.pysam.c
 samtools/bcftools/prob1.h
 samtools/bcftools/vcf.c.pysam.c
 samtools/misc/md5.c.pysam.c
 samtools/misc/md5.h
+samtools/misc/seqtk.c.pysam.c
 samtools/win32/xcurses.h
 samtools/win32/zconf.h
 samtools/win32/zlib.h
@@ -122,7 +119,6 @@ tabix/kseq.h
 tabix/ksort.h
 tabix/kstring.c.pysam.c
 tabix/kstring.h
-tabix/msvc_compat.h
 tabix/pysam.h
 tabix/tabix.h
 tests/00README.txt
index dc9e21c534b8e02409f3651ca4249e577228c9cd..4edcb4d48407c7137b2a0ea739c5cfa3864b92c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.13 on Thu May  5 14:57:52 2011 */
+/* Generated by Cython 0.14.1 on Thu Nov 17 22:34:01 2011 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
   #define PyBytes_Repr                 PyString_Repr
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+#endif
+
+#if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
 #endif
-
 #ifndef PySet_CheckExact
-#  define PySet_CheckExact(obj)          (Py_TYPE(obj) == &PySet_Type)
+  #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)
 #endif
 
 #if PY_MAJOR_VERSION >= 3
-  #define PyBoolObject PyLongObject
+  #define PyBoolObject                 PyLongObject
 #endif
 
 
   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
 #endif
 
+#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
+  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
+  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
+#else
+  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
+  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
+#endif
+
 #if PY_MAJOR_VERSION >= 3
   #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
 #endif
 #include "stdio.h"
 #include "pythread.h"
 
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+
 /* inline attribute */
 #ifndef CYTHON_INLINE
   #if defined(__GNUC__)
   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     #define CYTHON_INLINE inline
   #else
-    #define CYTHON_INLINE 
+    #define CYTHON_INLINE
   #endif
 #endif
 
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__)) 
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
 #   else
 #     define CYTHON_UNUSED
 #   endif
 # elif defined(__ICC) || defined(__INTEL_COMPILER)
-#   define CYTHON_UNUSED __attribute__ ((__unused__)) 
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
 # else
-#   define CYTHON_UNUSED 
+#   define CYTHON_UNUSED
 # endif
 #endif
 
@@ -251,7 +280,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 
 #ifdef __GNUC__
 /* Test for GCC > 2.95 */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
 #define likely(x)   __builtin_expect(!!(x), 1)
 #define unlikely(x) __builtin_expect(!!(x), 0)
 #else /* __GNUC__ > 2 ... */
@@ -276,11 +305,12 @@ static const char *__pyx_filename;
 static const char *__pyx_f[] = {
   "TabProxies.pyx",
   "bool.pxd",
+  "complex.pxd",
 };
 
 /* Type declarations */
 
-/* "pysam/TabProxies.pxd":42
+/* "TabProxies.pxd":42
  *   ctypedef int uint64_t
  * 
  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
@@ -300,7 +330,7 @@ struct __pyx_obj_10TabProxies_TupleProxy {
   int is_modified;
 };
 
-/* "pysam/TabProxies.pxd":77
+/* "TabProxies.pxd":78
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
@@ -312,7 +342,7 @@ struct __pyx_obj_10TabProxies_NamedTupleProxy {
   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
 };
 
-/* "pysam/TabProxies.pxd":91
+/* "TabProxies.pxd":92
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
@@ -326,7 +356,7 @@ struct __pyx_obj_10TabProxies_VCFProxy {
   uint32_t pos;
 };
 
-/* "pysam/TabProxies.pxd":60
+/* "TabProxies.pxd":61
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
@@ -348,7 +378,7 @@ struct __pyx_obj_10TabProxies_GTFProxy {
   int hasOwnAttributes;
 };
 
-/* "pysam/TabProxies.pxd":80
+/* "TabProxies.pxd":81
  *     pass
  * 
  * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
@@ -365,7 +395,7 @@ struct __pyx_obj_10TabProxies_BedProxy {
 };
 
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":20
+/* "TabProxies.pyx":20
  *      return not (buffer <= p < buffer + nbytes )
  * 
  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
@@ -383,7 +413,7 @@ struct __pyx_vtabstruct_10TabProxies_TupleProxy {
 static struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtabptr_10TabProxies_TupleProxy;
 
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":488
+/* "TabProxies.pyx":493
  *         self.fromDict( r )
  * 
  * cdef class NamedTupleProxy( TupleProxy ):             # <<<<<<<<<<<<<<
@@ -397,7 +427,7 @@ struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy {
 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
 
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":573
+/* "TabProxies.pyx":578
  *         TupleProxy._setindex(self, idx, str(value) )
  * 
  * cdef class VCFProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
@@ -411,7 +441,7 @@ struct __pyx_vtabstruct_10TabProxies_VCFProxy {
 static struct __pyx_vtabstruct_10TabProxies_VCFProxy *__pyx_vtabptr_10TabProxies_VCFProxy;
 
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":507
+/* "TabProxies.pyx":512
  *         return f( self.fields[idx] )
  * 
  * cdef class BedProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
@@ -425,7 +455,7 @@ struct __pyx_vtabstruct_10TabProxies_BedProxy {
 static struct __pyx_vtabstruct_10TabProxies_BedProxy *__pyx_vtabptr_10TabProxies_BedProxy;
 
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":231
+/* "TabProxies.pyx":240
  *         return str(v)
  * 
  * cdef class GTFProxy( TupleProxy ):             # <<<<<<<<<<<<<<
@@ -486,12 +516,24 @@ static struct __pyx_vtabstruct_10TabProxies_GTFProxy *__pyx_vtabptr_10TabProxies
 
 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
 
 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
     const char* function_name, int kw_allowed); /*proto*/
 
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
+static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
+
 static void __Pyx_RaiseDoubleKeywordsError(
     const char* func_name, PyObject* kw_name); /*proto*/
 
@@ -582,23 +624,11 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
     ((likely(PyFloat_CheckExact(obj))) ? \
      PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
 
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-
-static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
-static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
-
 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
 
-static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-
 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
 
 static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject *);
@@ -685,8 +715,11 @@ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
 
 /* Module declarations from cpython.float */
 
+/* Module declarations from __builtin__ */
+
 /* Module declarations from cpython.complex */
 
+static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
 /* Module declarations from cpython.string */
 
 /* Module declarations from cpython.unicode */
@@ -730,11 +763,12 @@ static char *__pyx_f_10TabProxies_nextItem(char *); /*proto*/
 static char *__pyx_f_10TabProxies_StrOrEmpty(char *); /*proto*/
 static int __pyx_f_10TabProxies_isNew(char *, char *, size_t); /*proto*/
 #define __Pyx_MODULE_NAME "TabProxies"
-int __pyx_module_is_main_TabProxies = 0;
+static int __pyx_module_is_main_TabProxies = 0;
 
 /* Implementation of TabProxies */
 static PyObject *__pyx_builtin_ValueError;
 static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_range;
 static PyObject *__pyx_builtin_StopIteration;
 static PyObject *__pyx_builtin_xrange;
 static PyObject *__pyx_builtin_TypeError;
@@ -743,45 +777,31 @@ static PyObject *__pyx_builtin_KeyError;
 static char __pyx_k_1[] = "malformatted entry at %s";
 static char __pyx_k_2[] = "";
 static char __pyx_k_3[] = "out of memory";
-static char __pyx_k_4[] = "incomplete line at %s";
-static char __pyx_k_5[] = "row too large - more than %i fields";
-static char __pyx_k_6[] = "list index out of range";
-static char __pyx_k_7[] = "\t";
-static char __pyx_k_8[] = ".";
-static char __pyx_k_9[] = "\"%s\"";
-static char __pyx_k_10[] = ";";
-static char __pyx_k_11[] = " ";
-static char __pyx_k_12[] = "\"";
-static char __pyx_k_13[] = "%s \"%s\"";
-static char __pyx_k_14[] = "%s %s";
-static char __pyx_k_15[] = "; ";
-static char __pyx_k_16[] = "'GTFProxy' has no attribute '%s'";
-static char __pyx_k_17[] = "field %s not set";
-static char __pyx_k_18[] = "bed format requires at least three columns";
-static char __pyx_k_19[] = "contig of feature.";
-static char __pyx_k_20[] = "feature name.";
-static char __pyx_k_21[] = "feature source.";
-static char __pyx_k_22[] = "feature start (in 0-based open/closed coordinates).";
-static char __pyx_k_23[] = "feature end (in 0-based open/closed coordinates).";
-static char __pyx_k_24[] = "feature score.";
-static char __pyx_k_25[] = "feature strand.";
-static char __pyx_k_26[] = "feature frame.";
-static char __pyx_k_27[] = "feature attributes (as a string).";
-static char __pyx_k_28[] = "TupleProxy._setindex (line 154)";
-static char __pyx_k_29[] = "TupleProxy.__setitem__ (line 177)";
-static char __pyx_k_30[] = "TupleProxy.__next__ (line 192)";
-static char __pyx_k_31[] = "TupleProxy.__str__ (line 202)";
-static char __pyx_k_32[] = "toDot (line 219)";
-static char __pyx_k_33[] = "quote (line 224)";
-static char __pyx_k_34[] = "GTFProxy.asDict (line 350)";
-static char __pyx_k_35[] = "GTFProxy.fromDict (line 385)";
-static char __pyx_k_36[] = "GTFProxy.invert (line 430)";
-static char __pyx_k_37[] = "GTFProxy.keys (line 441)";
-static char __pyx_k_38[] = "GTFProxy.__getattr__ (line 449)";
-static char __pyx_k_39[] = "GTFProxy.setAttribute (line 482)";
-static char __pyx_k_40[] = "NamedTupleProxy.__setattr__ (line 492)";
-static char __pyx_k_41[] = "BedProxy.__setattr__ (line 564)";
-static char __pyx_k_42[] = "VCFProxy.__setattr__ (line 608)";
+static char __pyx_k_5[] = "incomplete line at %s";
+static char __pyx_k_7[] = "row too large - more than %i fields";
+static char __pyx_k_8[] = "list index out of range";
+static char __pyx_k_10[] = "list index out of range %i >= %i";
+static char __pyx_k_14[] = "\t";
+static char __pyx_k_16[] = ".";
+static char __pyx_k_17[] = "\"%s\"";
+static char __pyx_k_18[] = ";";
+static char __pyx_k_20[] = " ";
+static char __pyx_k_22[] = "\"";
+static char __pyx_k_23[] = "%s \"%s\"";
+static char __pyx_k_24[] = "%s %s";
+static char __pyx_k_25[] = "; ";
+static char __pyx_k_29[] = "'GTFProxy' has no attribute '%s'";
+static char __pyx_k_30[] = "field %s not set";
+static char __pyx_k_31[] = "bed format requires at least three columns";
+static char __pyx_k_33[] = "contig of feature.";
+static char __pyx_k_34[] = "feature name.";
+static char __pyx_k_35[] = "feature source.";
+static char __pyx_k_36[] = "feature start (in 0-based open/closed coordinates).";
+static char __pyx_k_37[] = "feature end (in 0-based open/closed coordinates).";
+static char __pyx_k_38[] = "feature score.";
+static char __pyx_k_39[] = "feature strand.";
+static char __pyx_k_40[] = "feature frame.";
+static char __pyx_k_41[] = "feature attributes (as a string).";
 static char __pyx_k__id[] = "id";
 static char __pyx_k__alt[] = "alt";
 static char __pyx_k__end[] = "end";
@@ -790,7 +810,6 @@ static char __pyx_k__ref[] = "ref";
 static char __pyx_k__data[] = "data";
 static char __pyx_k__info[] = "info";
 static char __pyx_k__join[] = "join";
-static char __pyx_k__keys[] = "keys";
 static char __pyx_k__name[] = "name";
 static char __pyx_k__qual[] = "qual";
 static char __pyx_k__frame[] = "frame";
@@ -805,12 +824,12 @@ static char __pyx_k__strip[] = "strip";
 static char __pyx_k__toDot[] = "toDot";
 static char __pyx_k__types[] = "types";
 static char __pyx_k__value[] = "value";
+static char __pyx_k__append[] = "append";
 static char __pyx_k__asDict[] = "asDict";
 static char __pyx_k__contig[] = "contig";
 static char __pyx_k__fields[] = "fields";
 static char __pyx_k__filter[] = "filter";
 static char __pyx_k__format[] = "format";
-static char __pyx_k__invert[] = "invert";
 static char __pyx_k__nbytes[] = "nbytes";
 static char __pyx_k__offset[] = "offset";
 static char __pyx_k__source[] = "source";
@@ -819,23 +838,21 @@ static char __pyx_k__update[] = "update";
 static char __pyx_k__xrange[] = "xrange";
 static char __pyx_k____str__[] = "__str__";
 static char __pyx_k__feature[] = "feature";
+static char __pyx_k__indices[] = "indices";
 static char __pyx_k__itemRGB[] = "itemRGB";
 static char __pyx_k__nfields[] = "nfields";
-static char __pyx_k__BedProxy[] = "BedProxy";
-static char __pyx_k__GTFProxy[] = "GTFProxy";
 static char __pyx_k__KeyError[] = "KeyError";
-static char __pyx_k__VCFProxy[] = "VCFProxy";
 static char __pyx_k____main__[] = "__main__";
-static char __pyx_k____next__[] = "__next__";
 static char __pyx_k____test__[] = "__test__";
 static char __pyx_k__fromDict[] = "fromDict";
 static char __pyx_k__thickEnd[] = "thickEnd";
 static char __pyx_k__TypeError[] = "TypeError";
+static char __pyx_k___getindex[] = "_getindex";
 static char __pyx_k___setindex[] = "_setindex";
 static char __pyx_k__bedfields[] = "bedfields";
 static char __pyx_k__IndexError[] = "IndexError";
 static char __pyx_k__StringType[] = "StringType";
-static char __pyx_k__TupleProxy[] = "TupleProxy";
+static char __pyx_k__TabProxies[] = "TabProxies";
 static char __pyx_k__ValueError[] = "ValueError";
 static char __pyx_k__attributes[] = "attributes";
 static char __pyx_k__blockCount[] = "blockCount";
@@ -843,72 +860,51 @@ static char __pyx_k__blockSizes[] = "blockSizes";
 static char __pyx_k__thickStart[] = "thickStart";
 static char __pyx_k__StringTypes[] = "StringTypes";
 static char __pyx_k____getattr__[] = "__getattr__";
-static char __pyx_k____setattr__[] = "__setattr__";
 static char __pyx_k____setitem__[] = "__setitem__";
 static char __pyx_k__blockStarts[] = "blockStarts";
 static char __pyx_k__is_modified[] = "is_modified";
 static char __pyx_k__getMaxFields[] = "getMaxFields";
-static char __pyx_k__setAttribute[] = "setAttribute";
 static char __pyx_k__StopIteration[] = "StopIteration";
 static char __pyx_k__map_key2field[] = "map_key2field";
 static char __pyx_k__AttributeError[] = "AttributeError";
-static char __pyx_k__NamedTupleProxy[] = "NamedTupleProxy";
 static char __pyx_k__hasOwnAttributes[] = "hasOwnAttributes";
 static PyObject *__pyx_kp_s_1;
 static PyObject *__pyx_kp_s_10;
-static PyObject *__pyx_kp_s_11;
-static PyObject *__pyx_kp_s_12;
-static PyObject *__pyx_kp_s_13;
 static PyObject *__pyx_kp_s_14;
-static PyObject *__pyx_kp_s_15;
 static PyObject *__pyx_kp_s_16;
 static PyObject *__pyx_kp_s_17;
 static PyObject *__pyx_kp_s_18;
 static PyObject *__pyx_kp_s_2;
-static PyObject *__pyx_kp_u_28;
-static PyObject *__pyx_kp_u_29;
+static PyObject *__pyx_kp_s_20;
+static PyObject *__pyx_kp_s_22;
+static PyObject *__pyx_kp_s_23;
+static PyObject *__pyx_kp_s_24;
+static PyObject *__pyx_kp_s_25;
+static PyObject *__pyx_kp_s_29;
 static PyObject *__pyx_kp_s_3;
-static PyObject *__pyx_kp_u_30;
-static PyObject *__pyx_kp_u_31;
-static PyObject *__pyx_kp_u_32;
-static PyObject *__pyx_kp_u_33;
-static PyObject *__pyx_kp_u_34;
-static PyObject *__pyx_kp_u_35;
-static PyObject *__pyx_kp_u_36;
-static PyObject *__pyx_kp_u_37;
-static PyObject *__pyx_kp_u_38;
-static PyObject *__pyx_kp_u_39;
-static PyObject *__pyx_kp_s_4;
-static PyObject *__pyx_kp_u_40;
-static PyObject *__pyx_kp_u_41;
-static PyObject *__pyx_kp_u_42;
+static PyObject *__pyx_kp_s_30;
+static PyObject *__pyx_kp_s_31;
 static PyObject *__pyx_kp_s_5;
-static PyObject *__pyx_kp_s_6;
 static PyObject *__pyx_kp_s_7;
 static PyObject *__pyx_kp_s_8;
-static PyObject *__pyx_kp_s_9;
 static PyObject *__pyx_n_s__AttributeError;
-static PyObject *__pyx_n_s__BedProxy;
-static PyObject *__pyx_n_s__GTFProxy;
 static PyObject *__pyx_n_s__IndexError;
 static PyObject *__pyx_n_s__KeyError;
-static PyObject *__pyx_n_s__NamedTupleProxy;
 static PyObject *__pyx_n_s__StopIteration;
 static PyObject *__pyx_n_s__StringType;
 static PyObject *__pyx_n_s__StringTypes;
-static PyObject *__pyx_n_s__TupleProxy;
+static PyObject *__pyx_n_s__TabProxies;
 static PyObject *__pyx_n_s__TypeError;
-static PyObject *__pyx_n_s__VCFProxy;
 static PyObject *__pyx_n_s__ValueError;
 static PyObject *__pyx_n_s____getattr__;
 static PyObject *__pyx_n_s____main__;
-static PyObject *__pyx_n_s____next__;
-static PyObject *__pyx_n_s____setattr__;
 static PyObject *__pyx_n_s____setitem__;
 static PyObject *__pyx_n_s____str__;
 static PyObject *__pyx_n_s____test__;
+static PyObject *__pyx_n_s___getindex;
 static PyObject *__pyx_n_s___setindex;
 static PyObject *__pyx_n_s__alt;
+static PyObject *__pyx_n_s__append;
 static PyObject *__pyx_n_s__asDict;
 static PyObject *__pyx_n_s__attributes;
 static PyObject *__pyx_n_s__bedfields;
@@ -928,13 +924,12 @@ static PyObject *__pyx_n_s__getMaxFields;
 static PyObject *__pyx_n_s__hasOwnAttributes;
 static PyObject *__pyx_n_s__id;
 static PyObject *__pyx_n_s__index;
+static PyObject *__pyx_n_s__indices;
 static PyObject *__pyx_n_s__info;
-static PyObject *__pyx_n_s__invert;
 static PyObject *__pyx_n_s__is_modified;
 static PyObject *__pyx_n_s__itemRGB;
 static PyObject *__pyx_n_s__items;
 static PyObject *__pyx_n_s__join;
-static PyObject *__pyx_n_s__keys;
 static PyObject *__pyx_n_s__map_key2field;
 static PyObject *__pyx_n_s__name;
 static PyObject *__pyx_n_s__nbytes;
@@ -946,7 +941,6 @@ static PyObject *__pyx_n_s__quote;
 static PyObject *__pyx_n_s__range;
 static PyObject *__pyx_n_s__ref;
 static PyObject *__pyx_n_s__score;
-static PyObject *__pyx_n_s__setAttribute;
 static PyObject *__pyx_n_s__source;
 static PyObject *__pyx_n_s__split;
 static PyObject *__pyx_n_s__start;
@@ -971,8 +965,21 @@ static PyObject *__pyx_int_8;
 static PyObject *__pyx_int_9;
 static PyObject *__pyx_int_10;
 static PyObject *__pyx_int_11;
-
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":4
+static PyObject *__pyx_k_tuple_4;
+static PyObject *__pyx_k_tuple_6;
+static PyObject *__pyx_k_tuple_9;
+static PyObject *__pyx_k_tuple_11;
+static PyObject *__pyx_k_tuple_12;
+static PyObject *__pyx_k_tuple_13;
+static PyObject *__pyx_k_tuple_15;
+static PyObject *__pyx_k_tuple_19;
+static PyObject *__pyx_k_tuple_21;
+static PyObject *__pyx_k_tuple_26;
+static PyObject *__pyx_k_tuple_27;
+static PyObject *__pyx_k_tuple_28;
+static PyObject *__pyx_k_tuple_32;
+
+/* "TabProxies.pyx":4
  * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
  * 
  * cdef char * nextItem( char * buffer ):             # <<<<<<<<<<<<<<
@@ -988,7 +995,7 @@ static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
   PyObject *__pyx_t_3 = NULL;
   __Pyx_RefNannySetupContext("nextItem");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":6
+  /* "TabProxies.pyx":6
  * cdef char * nextItem( char * buffer ):
  *     cdef char * pos
  *     pos = strchr( buffer, '\t' )             # <<<<<<<<<<<<<<
@@ -997,7 +1004,7 @@ static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
  */
   __pyx_v_pos = strchr(__pyx_v_buffer, '\t');
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":7
+  /* "TabProxies.pyx":7
  *     cdef char * pos
  *     pos = strchr( buffer, '\t' )
  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )             # <<<<<<<<<<<<<<
@@ -1012,13 +1019,13 @@ static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_DECREF(((PyObject *)__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 = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1026,7 +1033,7 @@ static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
   }
   __pyx_L3:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":8
+  /* "TabProxies.pyx":8
  *     pos = strchr( buffer, '\t' )
  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
  *     pos[0] = '\0'             # <<<<<<<<<<<<<<
@@ -1035,16 +1042,16 @@ static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
  */
   (__pyx_v_pos[0]) = '\x00';
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":9
+  /* "TabProxies.pyx":9
  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
  *     pos[0] = '\0'
  *     pos += 1             # <<<<<<<<<<<<<<
  *     return pos
  * 
  */
-  __pyx_v_pos += 1;
+  __pyx_v_pos = (__pyx_v_pos + 1);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":10
+  /* "TabProxies.pyx":10
  *     pos[0] = '\0'
  *     pos += 1
  *     return pos             # <<<<<<<<<<<<<<
@@ -1066,7 +1073,7 @@ static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":12
+/* "TabProxies.pyx":12
  *     return pos
  * 
  * cdef char *StrOrEmpty( char * buffer ):             # <<<<<<<<<<<<<<
@@ -1079,7 +1086,7 @@ static  char *__pyx_f_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("StrOrEmpty");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":13
+  /* "TabProxies.pyx":13
  * 
  * cdef char *StrOrEmpty( char * buffer ):
  *      if buffer == NULL: return ""             # <<<<<<<<<<<<<<
@@ -1094,7 +1101,7 @@ static  char *__pyx_f_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":14
+    /* "TabProxies.pyx":14
  * cdef char *StrOrEmpty( char * buffer ):
  *      if buffer == NULL: return ""
  *      else: return buffer             # <<<<<<<<<<<<<<
@@ -1112,7 +1119,7 @@ static  char *__pyx_f_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":16
+/* "TabProxies.pyx":16
  *      else: return buffer
  * 
  * cdef int isNew( char * p, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1125,7 +1132,7 @@ static  int __pyx_f_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buffer, si
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("isNew");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":17
+  /* "TabProxies.pyx":17
  * 
  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
  *      if p == NULL: return 0             # <<<<<<<<<<<<<<
@@ -1140,7 +1147,7 @@ static  int __pyx_f_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buffer, si
   }
   __pyx_L3:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":18
+  /* "TabProxies.pyx":18
  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
  *      if p == NULL: return 0
  *      return not (buffer <= p < buffer + nbytes )             # <<<<<<<<<<<<<<
@@ -1160,7 +1167,7 @@ static  int __pyx_f_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buffer, si
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":30
+/* "TabProxies.pyx":30
  *     '''
  * 
  *     def __cinit__(self ):             # <<<<<<<<<<<<<<
@@ -1176,7 +1183,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":31
+  /* "TabProxies.pyx":31
  * 
  *     def __cinit__(self ):
  *         self.data = NULL             # <<<<<<<<<<<<<<
@@ -1185,7 +1192,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data = NULL;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":32
+  /* "TabProxies.pyx":32
  *     def __cinit__(self ):
  *         self.data = NULL
  *         self.fields = NULL             # <<<<<<<<<<<<<<
@@ -1194,7 +1201,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields = NULL;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":33
+  /* "TabProxies.pyx":33
  *         self.data = NULL
  *         self.fields = NULL
  *         self.index = 0             # <<<<<<<<<<<<<<
@@ -1203,7 +1210,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":34
+  /* "TabProxies.pyx":34
  *         self.fields = NULL
  *         self.index = 0
  *         self.nbytes = 0             # <<<<<<<<<<<<<<
@@ -1212,7 +1219,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":35
+  /* "TabProxies.pyx":35
  *         self.index = 0
  *         self.nbytes = 0
  *         self.is_modified = 0             # <<<<<<<<<<<<<<
@@ -1221,7 +1228,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":36
+  /* "TabProxies.pyx":36
  *         self.nbytes = 0
  *         self.is_modified = 0
  *         self.nfields = 0             # <<<<<<<<<<<<<<
@@ -1230,7 +1237,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":38
+  /* "TabProxies.pyx":38
  *         self.nfields = 0
  *         # start counting at field offset
  *         self.offset = 0             # <<<<<<<<<<<<<<
@@ -1244,7 +1251,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":40
+/* "TabProxies.pyx":40
  *         self.offset = 0
  * 
  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
@@ -1252,15 +1259,15 @@ static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self,
  *         if self.is_modified:
  */
 
-static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pf_10TabProxies_10TupleProxy_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pf_10TabProxies_10TupleProxy_1__dealloc__(PyObject *__pyx_v_self) {
   int __pyx_v_x;
   int __pyx_t_1;
   int __pyx_t_2;
   int __pyx_t_3;
   __Pyx_RefNannySetupContext("__dealloc__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":42
+  /* "TabProxies.pyx":42
  *     def __dealloc__(self):
  *         cdef int x
  *         if self.is_modified:             # <<<<<<<<<<<<<<
@@ -1269,7 +1276,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
  */
   if (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":43
+    /* "TabProxies.pyx":43
  *         cdef int x
  *         if self.is_modified:
  *             for x from 0 <= x < self.nfields:             # <<<<<<<<<<<<<<
@@ -1279,7 +1286,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
     __pyx_t_1 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
     for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_1; __pyx_v_x++) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":44
+      /* "TabProxies.pyx":44
  *         if self.is_modified:
  *             for x from 0 <= x < self.nfields:
  *                 if isNew( self.fields[x], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
@@ -1289,7 +1296,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
       __pyx_t_2 = __pyx_f_10TabProxies_isNew((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]), ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes);
       if (__pyx_t_2) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":45
+        /* "TabProxies.pyx":45
  *             for x from 0 <= x < self.nfields:
  *                 if isNew( self.fields[x], self.data, self.nbytes ):
  *                     free( self.fields[x] )             # <<<<<<<<<<<<<<
@@ -1298,7 +1305,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
  */
         free((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]));
 
-        /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":46
+        /* "TabProxies.pyx":46
  *                 if isNew( self.fields[x], self.data, self.nbytes ):
  *                     free( self.fields[x] )
  *                     self.fields[x] = NULL             # <<<<<<<<<<<<<<
@@ -1314,7 +1321,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":48
+  /* "TabProxies.pyx":48
  *                     self.fields[x] = NULL
  * 
  *         if self.data != NULL: free(self.data)             # <<<<<<<<<<<<<<
@@ -1328,7 +1335,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":49
+  /* "TabProxies.pyx":49
  * 
  *         if self.data != NULL: free(self.data)
  *         if self.fields != NULL: free( self.fields )             # <<<<<<<<<<<<<<
@@ -1345,7 +1352,7 @@ static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_sel
   __Pyx_RefNannyFinishContext();
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":51
+/* "TabProxies.pyx":51
  *         if self.fields != NULL: free( self.fields )
  * 
  *     cdef take( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1358,7 +1365,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_take(struct __pyx_obj_10TabP
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("take");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":56
+  /* "TabProxies.pyx":56
  *         Take ownership of the pointer.
  *         '''
  *         self.data = buffer             # <<<<<<<<<<<<<<
@@ -1367,7 +1374,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_take(struct __pyx_obj_10TabP
  */
   __pyx_v_self->data = __pyx_v_buffer;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":57
+  /* "TabProxies.pyx":57
  *         '''
  *         self.data = buffer
  *         self.nbytes = nbytes             # <<<<<<<<<<<<<<
@@ -1376,7 +1383,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_take(struct __pyx_obj_10TabP
  */
   __pyx_v_self->nbytes = __pyx_v_nbytes;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":58
+  /* "TabProxies.pyx":58
  *         self.data = buffer
  *         self.nbytes = nbytes
  *         self.update( buffer, nbytes )             # <<<<<<<<<<<<<<
@@ -1399,7 +1406,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_take(struct __pyx_obj_10TabP
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":60
+/* "TabProxies.pyx":60
  *         self.update( buffer, nbytes )
  * 
  *     cdef present( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1412,7 +1419,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_present(struct __pyx_obj_10T
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("present");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":65
+  /* "TabProxies.pyx":65
  *         Do not take ownership of the pointer.
  *         '''
  *         self.update( buffer, nbytes )             # <<<<<<<<<<<<<<
@@ -1435,7 +1442,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_present(struct __pyx_obj_10T
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":67
+/* "TabProxies.pyx":67
  *         self.update( buffer, nbytes )
  * 
  *     cdef copy( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1448,10 +1455,9 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
   PyObject *__pyx_r = NULL;
   int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
   __Pyx_RefNannySetupContext("copy");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":74
+  /* "TabProxies.pyx":74
  *         cdef int s
  *         # +1 for '\0'
  *         s = sizeof(char) *  (nbytes + 1)             # <<<<<<<<<<<<<<
@@ -1460,7 +1466,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
  */
   __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":75
+  /* "TabProxies.pyx":75
  *         # +1 for '\0'
  *         s = sizeof(char) *  (nbytes + 1)
  *         self.data = <char*>malloc( s )             # <<<<<<<<<<<<<<
@@ -1469,7 +1475,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
  */
   __pyx_v_self->data = ((char *)malloc(__pyx_v_s));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":76
+  /* "TabProxies.pyx":76
  *         s = sizeof(char) *  (nbytes + 1)
  *         self.data = <char*>malloc( s )
  *         if self.data == NULL:             # <<<<<<<<<<<<<<
@@ -1479,29 +1485,23 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
   __pyx_t_1 = (__pyx_v_self->data == NULL);
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":77
+    /* "TabProxies.pyx":77
  *         self.data = <char*>malloc( s )
  *         if self.data == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  *         self.nbytes = nbytes
  *         memcpy( <char*>self.data, buffer, s )
  */
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_2, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":78
+  /* "TabProxies.pyx":78
  *         if self.data == NULL:
  *             raise ValueError("out of memory" )
  *         self.nbytes = nbytes             # <<<<<<<<<<<<<<
@@ -1510,7 +1510,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
  */
   __pyx_v_self->nbytes = __pyx_v_nbytes;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":79
+  /* "TabProxies.pyx":79
  *             raise ValueError("out of memory" )
  *         self.nbytes = nbytes
  *         memcpy( <char*>self.data, buffer, s )             # <<<<<<<<<<<<<<
@@ -1519,22 +1519,21 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
  */
   memcpy(__pyx_v_self->data, __pyx_v_buffer, __pyx_v_s);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":80
+  /* "TabProxies.pyx":80
  *         self.nbytes = nbytes
  *         memcpy( <char*>self.data, buffer, s )
  *         self.update( self.data, nbytes )             # <<<<<<<<<<<<<<
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):
  */
-  __pyx_t_3 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   __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_AddTraceback("TabProxies.TupleProxy.copy");
   __pyx_r = 0;
   __pyx_L0:;
@@ -1543,7 +1542,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabP
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":82
+/* "TabProxies.pyx":82
  *         self.update( self.data, nbytes )
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1555,7 +1554,7 @@ static  int __pyx_f_10TabProxies_10TupleProxy_getMaxFields(struct __pyx_obj_10Ta
   int __pyx_r;
   __Pyx_RefNannySetupContext("getMaxFields");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":84
+  /* "TabProxies.pyx":84
  *     cdef int getMaxFields( self, size_t nbytes ):
  *         '''initialize fields.'''
  *         return nbytes / 2             # <<<<<<<<<<<<<<
@@ -1571,7 +1570,7 @@ static  int __pyx_f_10TabProxies_10TupleProxy_getMaxFields(struct __pyx_obj_10Ta
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":86
+/* "TabProxies.pyx":86
  *         return nbytes / 2
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1592,7 +1591,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   int __pyx_t_5;
   __Pyx_RefNannySetupContext("update");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":101
+  /* "TabProxies.pyx":101
  *         cdef int max_fields, x
  * 
  *         if buffer[nbytes] != 0:             # <<<<<<<<<<<<<<
@@ -1602,7 +1601,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":102
+    /* "TabProxies.pyx":102
  * 
  *         if buffer[nbytes] != 0:
  *             raise ValueError( "incomplete line at %s" % buffer )             # <<<<<<<<<<<<<<
@@ -1611,17 +1610,17 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
     __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_DECREF(((PyObject *)__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 = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1629,7 +1628,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   }
   __pyx_L3:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":106
+  /* "TabProxies.pyx":106
  *         #################################
  *         # clear data
  *         if self.fields != NULL: free(self.fields)             # <<<<<<<<<<<<<<
@@ -1643,7 +1642,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   }
   __pyx_L4:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":108
+  /* "TabProxies.pyx":108
  *         if self.fields != NULL: free(self.fields)
  * 
  *         for field from 0 <= field < self.nfields:             # <<<<<<<<<<<<<<
@@ -1653,7 +1652,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   __pyx_t_4 = __pyx_v_self->nfields;
   for (__pyx_v_field = 0; __pyx_v_field < __pyx_t_4; __pyx_v_field++) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":109
+    /* "TabProxies.pyx":109
  * 
  *         for field from 0 <= field < self.nfields:
  *             if isNew( self.fields[field], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
@@ -1663,7 +1662,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
     __pyx_t_5 = __pyx_f_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_field]), __pyx_v_self->data, __pyx_v_self->nbytes);
     if (__pyx_t_5) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":110
+      /* "TabProxies.pyx":110
  *         for field from 0 <= field < self.nfields:
  *             if isNew( self.fields[field], self.data, self.nbytes ):
  *                 free( self.fields[field] )             # <<<<<<<<<<<<<<
@@ -1676,7 +1675,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
     __pyx_L7:;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":112
+  /* "TabProxies.pyx":112
  *                 free( self.fields[field] )
  * 
  *         self.is_modified = self.nfields = 0             # <<<<<<<<<<<<<<
@@ -1686,7 +1685,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   __pyx_v_self->is_modified = 0;
   __pyx_v_self->nfields = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":116
+  /* "TabProxies.pyx":116
  *         #################################
  *         # allocate new
  *         max_fields = self.getMaxFields( nbytes )             # <<<<<<<<<<<<<<
@@ -1695,7 +1694,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
   __pyx_v_max_fields = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMaxFields(__pyx_v_self, __pyx_v_nbytes);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":117
+  /* "TabProxies.pyx":117
  *         # allocate new
  *         max_fields = self.getMaxFields( nbytes )
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )             # <<<<<<<<<<<<<<
@@ -1704,7 +1703,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
   __pyx_v_self->fields = ((char **)calloc(__pyx_v_max_fields, (sizeof(char *))));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":118
+  /* "TabProxies.pyx":118
  *         max_fields = self.getMaxFields( nbytes )
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
  *         if self.fields == NULL:             # <<<<<<<<<<<<<<
@@ -1714,29 +1713,23 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   __pyx_t_1 = (__pyx_v_self->fields == NULL);
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":119
+    /* "TabProxies.pyx":119
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
  *         if self.fields == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  * 
  *         #################################
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_2, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L8;
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":123
+  /* "TabProxies.pyx":123
  *         #################################
  *         # start filling
  *         field = 0             # <<<<<<<<<<<<<<
@@ -1745,7 +1738,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
   __pyx_v_field = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":124
+  /* "TabProxies.pyx":124
  *         # start filling
  *         field = 0
  *         self.fields[field] = pos = buffer             # <<<<<<<<<<<<<<
@@ -1755,16 +1748,16 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_buffer;
   __pyx_v_pos = __pyx_v_buffer;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":125
+  /* "TabProxies.pyx":125
  *         field = 0
  *         self.fields[field] = pos = buffer
  *         field += 1             # <<<<<<<<<<<<<<
  *         old_pos = pos
  * 
  */
-  __pyx_v_field += 1;
+  __pyx_v_field = (__pyx_v_field + 1);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":126
+  /* "TabProxies.pyx":126
  *         self.fields[field] = pos = buffer
  *         field += 1
  *         old_pos = pos             # <<<<<<<<<<<<<<
@@ -1773,7 +1766,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
   __pyx_v_old_pos = __pyx_v_pos;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":128
+  /* "TabProxies.pyx":128
  *         old_pos = pos
  * 
  *         while 1:             # <<<<<<<<<<<<<<
@@ -1783,7 +1776,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   while (1) {
     if (!1) break;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":130
+    /* "TabProxies.pyx":130
  *         while 1:
  * 
  *             pos = <char*>memchr( pos, '\t', nbytes )             # <<<<<<<<<<<<<<
@@ -1792,7 +1785,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
     __pyx_v_pos = ((char *)memchr(__pyx_v_pos, '\t', __pyx_v_nbytes));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":131
+    /* "TabProxies.pyx":131
  * 
  *             pos = <char*>memchr( pos, '\t', nbytes )
  *             if pos == NULL: break             # <<<<<<<<<<<<<<
@@ -1806,7 +1799,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
     }
     __pyx_L11:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":132
+    /* "TabProxies.pyx":132
  *             pos = <char*>memchr( pos, '\t', nbytes )
  *             if pos == NULL: break
  *             pos[0] = '\0'             # <<<<<<<<<<<<<<
@@ -1815,16 +1808,16 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
     (__pyx_v_pos[0]) = '\x00';
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":133
+    /* "TabProxies.pyx":133
  *             if pos == NULL: break
  *             pos[0] = '\0'
  *             pos += 1             # <<<<<<<<<<<<<<
  *             self.fields[field] = pos
  *             field += 1
  */
-    __pyx_v_pos += 1;
+    __pyx_v_pos = (__pyx_v_pos + 1);
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":134
+    /* "TabProxies.pyx":134
  *             pos[0] = '\0'
  *             pos += 1
  *             self.fields[field] = pos             # <<<<<<<<<<<<<<
@@ -1833,16 +1826,16 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
  */
     (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_pos;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":135
+    /* "TabProxies.pyx":135
  *             pos += 1
  *             self.fields[field] = pos
  *             field += 1             # <<<<<<<<<<<<<<
  *             if field >= max_fields:
  *                 raise ValueError("row too large - more than %i fields" % max_fields )
  */
-    __pyx_v_field += 1;
+    __pyx_v_field = (__pyx_v_field + 1);
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":136
+    /* "TabProxies.pyx":136
  *             self.fields[field] = pos
  *             field += 1
  *             if field >= max_fields:             # <<<<<<<<<<<<<<
@@ -1852,43 +1845,43 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
     __pyx_t_1 = (__pyx_v_field >= __pyx_v_max_fields);
     if (__pyx_t_1) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":137
+      /* "TabProxies.pyx":137
  *             field += 1
  *             if field >= max_fields:
  *                 raise ValueError("row too large - more than %i fields" % max_fields )             # <<<<<<<<<<<<<<
  *             nbytes -= pos - old_pos
  *             if nbytes < 0: break
  */
-      __pyx_t_2 = PyInt_FromLong(__pyx_v_max_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyInt_FromLong(__pyx_v_max_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__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 = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-      __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+      __Pyx_Raise(__pyx_t_2, 0, 0);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_3, 0, 0);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L12;
     }
     __pyx_L12:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":138
+    /* "TabProxies.pyx":138
  *             if field >= max_fields:
  *                 raise ValueError("row too large - more than %i fields" % max_fields )
  *             nbytes -= pos - old_pos             # <<<<<<<<<<<<<<
  *             if nbytes < 0: break
  *             old_pos = pos
  */
-    __pyx_v_nbytes -= (__pyx_v_pos - __pyx_v_old_pos);
+    __pyx_v_nbytes = (__pyx_v_nbytes - (__pyx_v_pos - __pyx_v_old_pos));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":139
+    /* "TabProxies.pyx":139
  *                 raise ValueError("row too large - more than %i fields" % max_fields )
  *             nbytes -= pos - old_pos
  *             if nbytes < 0: break             # <<<<<<<<<<<<<<
@@ -1902,7 +1895,7 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
     }
     __pyx_L13:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":140
+    /* "TabProxies.pyx":140
  *             nbytes -= pos - old_pos
  *             if nbytes < 0: break
  *             old_pos = pos             # <<<<<<<<<<<<<<
@@ -1913,12 +1906,12 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   }
   __pyx_L10_break:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":142
+  /* "TabProxies.pyx":142
  *             old_pos = pos
  * 
  *         self.nfields = field             # <<<<<<<<<<<<<<
  * 
- *     def __getitem__( self, key ):
+ *     def _getindex( self, int index ):
  */
   __pyx_v_self->nfields = __pyx_v_field;
 
@@ -1935,106 +1928,125 @@ static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10Ta
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":144
+/* "TabProxies.pyx":144
  *         self.nfields = field
  * 
- *     def __getitem__( self, key ):             # <<<<<<<<<<<<<<
- * 
- *         cdef int i = key
+ *     def _getindex( self, int index ):             # <<<<<<<<<<<<<<
+ *         '''return item at idx index'''
+ *         cdef int i = index
  */
 
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_2_getindex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
+static char __pyx_doc_10TabProxies_10TupleProxy_2_getindex[] = "return item at idx index";
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_2_getindex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
+  int __pyx_v_index;
   int __pyx_v_i;
   PyObject *__pyx_r = NULL;
   int __pyx_t_1;
-  int __pyx_t_2;
+  PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  __Pyx_RefNannySetupContext("__getitem__");
+  __Pyx_RefNannySetupContext("_getindex");
+  assert(__pyx_arg_index); {
+    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("TabProxies.TupleProxy._getindex");
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":146
- *     def __getitem__( self, key ):
- * 
- *         cdef int i = key             # <<<<<<<<<<<<<<
+  /* "TabProxies.pyx":146
+ *     def _getindex( self, int index ):
+ *         '''return item at idx index'''
+ *         cdef int i = index             # <<<<<<<<<<<<<<
  *         if i < 0: i += self.nfields
  *         if i < 0: raise IndexError( "list index out of range" )
  */
-  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_key); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_i = __pyx_t_1;
+  __pyx_v_i = __pyx_v_index;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":147
- * 
- *         cdef int i = key
+  /* "TabProxies.pyx":147
+ *         '''return item at idx index'''
+ *         cdef int i = index
  *         if i < 0: i += self.nfields             # <<<<<<<<<<<<<<
  *         if i < 0: raise IndexError( "list index out of range" )
  *         i += self.offset
  */
-  __pyx_t_2 = (__pyx_v_i < 0);
-  if (__pyx_t_2) {
-    __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
+  __pyx_t_1 = (__pyx_v_i < 0);
+  if (__pyx_t_1) {
+    __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":148
- *         cdef int i = key
+  /* "TabProxies.pyx":148
+ *         cdef int i = index
  *         if i < 0: i += self.nfields
  *         if i < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
  *         i += self.offset
  *         if i >= self.nfields:
  */
-  __pyx_t_2 = (__pyx_v_i < 0);
-  if (__pyx_t_2) {
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = (__pyx_v_i < 0);
+  if (__pyx_t_1) {
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":149
+  /* "TabProxies.pyx":149
  *         if i < 0: i += self.nfields
  *         if i < 0: raise IndexError( "list index out of range" )
  *         i += self.offset             # <<<<<<<<<<<<<<
  *         if i >= self.nfields:
- *             raise IndexError( "list index out of range)
+ *             raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
  */
-  __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset;
+  __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":150
+  /* "TabProxies.pyx":150
  *         if i < 0: raise IndexError( "list index out of range" )
  *         i += self.offset
  *         if i >= self.nfields:             # <<<<<<<<<<<<<<
- *             raise IndexError( "list index out of range)
+ *             raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
  *         return self.fields[i]
  */
-  __pyx_t_2 = (__pyx_v_i >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
-  if (__pyx_t_2) {
+  __pyx_t_1 = (__pyx_v_i >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
+  if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":151
+    /* "TabProxies.pyx":151
  *         i += self.offset
  *         if i >= self.nfields:
- *             raise IndexError( "list index out of range)             # <<<<<<<<<<<<<<
+ *             raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))             # <<<<<<<<<<<<<<
  *         return self.fields[i]
  * 
  */
+    __pyx_t_2 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __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 = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_2 = 0;
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -2042,12 +2054,12 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":152
+  /* "TabProxies.pyx":152
  *         if i >= self.nfields:
- *             raise IndexError( "list index out of range)
+ *             raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
  *         return self.fields[i]             # <<<<<<<<<<<<<<
  * 
- *     def _setindex( self, index, value ):
+ *     def __getitem__( self, key ):
  */
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_3 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -2059,9 +2071,10 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("TabProxies.TupleProxy.__getitem__");
+  __Pyx_AddTraceback("TabProxies.TupleProxy._getindex");
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -2069,137 +2082,363 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":154
+/* "TabProxies.pyx":154
  *         return self.fields[i]
  * 
- *     def _setindex( self, index, value ):             # <<<<<<<<<<<<<<
- *         '''set item at idx index.'''
- *         cdef int idx = index
+ *     def __getitem__( self, key ):             # <<<<<<<<<<<<<<
+ *         if type(key) == int: return self._getindex( key )
+ *         # slice object
  */
 
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_10TabProxies_10TupleProxy__setindex[] = "set item at idx index.";
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_index = 0;
-  PyObject *__pyx_v_value = 0;
-  int __pyx_v_idx;
-  char *__pyx_v_tmp;
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+  PyObject *__pyx_v_start;
+  PyObject *__pyx_v_end;
+  PyObject *__pyx_v_step;
+  PyObject *__pyx_v_result;
+  PyObject *__pyx_v_index;
   PyObject *__pyx_r = NULL;
-  int __pyx_t_1;
+  PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  char *__pyx_t_5;
-  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__value,0};
-  __Pyx_RefNannySetupContext("_setindex");
-  if (unlikely(__pyx_kwds)) {
-    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
-    PyObject* values[2] = {0,0};
-    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);
-      case  0: break;
-      default: goto __pyx_L5_argtuple_error;
-    }
-    switch (PyTuple_GET_SIZE(__pyx_args)) {
-      case  0:
-      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
-      if (likely(values[0])) kw_args--;
-      else goto __pyx_L5_argtuple_error;
-      case  1:
-      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
-      if (likely(values[1])) kw_args--;
-      else {
-        __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    }
-    if (unlikely(kw_args > 0)) {
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_setindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    }
-    __pyx_v_index = values[0];
-    __pyx_v_value = values[1];
-  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-    goto __pyx_L5_argtuple_error;
-  } else {
-    __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
-    __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":156
- *     def _setindex( self, index, value ):
- *         '''set item at idx index.'''
- *         cdef int idx = index             # <<<<<<<<<<<<<<
- *         if idx < 0: raise IndexError( "list index out of range" )
- *         if idx >= self.nfields:
- */
-  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_idx = __pyx_t_1;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_7;
+  int __pyx_t_8;
+  __Pyx_RefNannySetupContext("__getitem__");
+  __pyx_v_start = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_end = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_step = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":157
- *         '''set item at idx index.'''
- *         cdef int idx = index
- *         if idx < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
- *         if idx >= self.nfields:
- *             raise IndexError( "list index out of range" )
+  /* "TabProxies.pyx":155
+ * 
+ *     def __getitem__( self, key ):
+ *         if type(key) == int: return self._getindex( key )             # <<<<<<<<<<<<<<
+ *         # slice object
+ *         start, end, step = key.indices( self.nfields )
  */
-  __pyx_t_2 = (__pyx_v_idx < 0);
+  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_key)), ((PyObject *)((PyObject*)(&PyInt_Type))), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __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 = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    __Pyx_INCREF(__pyx_v_key);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
+    __Pyx_GIVEREF(__pyx_v_key);
+    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L6;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+    goto __pyx_L5;
   }
-  __pyx_L6:;
+  __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":158
- *         cdef int idx = index
- *         if idx < 0: raise IndexError( "list index out of range" )
- *         if idx >= self.nfields:             # <<<<<<<<<<<<<<
- *             raise IndexError( "list index out of range" )
- * 
+  /* "TabProxies.pyx":157
+ *         if type(key) == int: return self._getindex( key )
+ *         # slice object
+ *         start, end, step = key.indices( self.nfields )             # <<<<<<<<<<<<<<
+ *         result = []
+ *         for index in range( start, end, step ):
  */
-  __pyx_t_2 = (__pyx_v_idx >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
-  if (__pyx_t_2) {
+  __pyx_t_4 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__indices); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 3)) {
+    PyObject* tuple = __pyx_t_3;
+    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_v_start);
+    __pyx_v_start = __pyx_t_1;
+    __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_v_end);
+    __pyx_v_end = __pyx_t_4;
+    __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_v_step);
+    __pyx_v_step = __pyx_t_5;
+    __pyx_t_5 = 0;
+  } else {
+    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    if (__Pyx_EndUnpack(__pyx_t_6, 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_v_start);
+    __pyx_v_start = __pyx_t_1;
+    __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_v_end);
+    __pyx_v_end = __pyx_t_4;
+    __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_v_step);
+    __pyx_v_step = __pyx_t_5;
+    __pyx_t_5 = 0;
+  }
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":159
- *         if idx < 0: raise IndexError( "list index out of range" )
- *         if idx >= self.nfields:
- *             raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
- * 
- *         if isNew( self.fields[idx], self.data, self.nbytes ):
+  /* "TabProxies.pyx":158
+ *         # slice object
+ *         start, end, step = key.indices( self.nfields )
+ *         result = []             # <<<<<<<<<<<<<<
+ *         for index in range( start, end, step ):
+ *             result.append( self._getindex( index ) )
  */
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_DECREF(((PyObject *)__pyx_v_result));
+  __pyx_v_result = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "TabProxies.pyx":159
+ *         start, end, step = key.indices( self.nfields )
+ *         result = []
+ *         for index in range( start, end, step ):             # <<<<<<<<<<<<<<
+ *             result.append( self._getindex( index ) )
+ *         return result
+ */
+  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_INCREF(__pyx_v_start);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_start);
+  __Pyx_GIVEREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_end);
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_end);
+  __Pyx_GIVEREF(__pyx_v_end);
+  __Pyx_INCREF(__pyx_v_step);
+  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_step);
+  __Pyx_GIVEREF(__pyx_v_step);
+  __pyx_t_5 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
+    __pyx_t_7 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3);
+  } else {
+    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  for (;;) {
+    if (likely(PyList_CheckExact(__pyx_t_3))) {
+      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
+      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
+      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
+    } else {
+      __pyx_t_5 = PyIter_Next(__pyx_t_3);
+      if (!__pyx_t_5) {
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+    }
+    __Pyx_DECREF(__pyx_v_index);
+    __pyx_v_index = __pyx_t_5;
+    __pyx_t_5 = 0;
+
+    /* "TabProxies.pyx":160
+ *         result = []
+ *         for index in range( start, end, step ):
+ *             result.append( self._getindex( index ) )             # <<<<<<<<<<<<<<
+ *         return result
+ * 
+ */
+    if (unlikely(__pyx_v_result == Py_None)) {
+      PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
+    }
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___getindex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    __Pyx_INCREF(__pyx_v_index);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_index);
+    __Pyx_GIVEREF(__pyx_v_index);
+    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+    __pyx_t_8 = PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "TabProxies.pyx":161
+ *         for index in range( start, end, step ):
+ *             result.append( self._getindex( index ) )
+ *         return result             # <<<<<<<<<<<<<<
+ * 
+ *     def _setindex( self, index, value ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_result));
+  __pyx_r = ((PyObject *)__pyx_v_result);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("TabProxies.TupleProxy.__getitem__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(__pyx_v_start);
+  __Pyx_DECREF(__pyx_v_end);
+  __Pyx_DECREF(__pyx_v_step);
+  __Pyx_DECREF(__pyx_v_result);
+  __Pyx_DECREF(__pyx_v_index);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "TabProxies.pyx":163
+ *         return result
+ * 
+ *     def _setindex( self, index, value ):             # <<<<<<<<<<<<<<
+ *         '''set item at idx index.'''
+ *         cdef int idx = index
+ */
+
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_4_setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10TabProxies_10TupleProxy_4_setindex[] = "set item at idx index.";
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_4_setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_index = 0;
+  PyObject *__pyx_v_value = 0;
+  int __pyx_v_idx;
+  char *__pyx_v_tmp;
+  PyObject *__pyx_r = NULL;
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  char *__pyx_t_4;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__value,0};
+  __Pyx_RefNannySetupContext("_setindex");
+  if (unlikely(__pyx_kwds)) {
+    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+    PyObject* values[2] = {0,0};
+    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);
+      case  0: break;
+      default: goto __pyx_L5_argtuple_error;
+    }
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  0:
+      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
+      if (likely(values[0])) kw_args--;
+      else goto __pyx_L5_argtuple_error;
+      case  1:
+      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
+      if (likely(values[1])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    }
+    if (unlikely(kw_args > 0)) {
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_setindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    }
+    __pyx_v_index = values[0];
+    __pyx_v_value = values[1];
+  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+    goto __pyx_L5_argtuple_error;
+  } else {
+    __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
+    __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+
+  /* "TabProxies.pyx":165
+ *     def _setindex( self, index, value ):
+ *         '''set item at idx index.'''
+ *         cdef int idx = index             # <<<<<<<<<<<<<<
+ *         if idx < 0: raise IndexError( "list index out of range" )
+ *         if idx >= self.nfields:
+ */
+  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_idx = __pyx_t_1;
+
+  /* "TabProxies.pyx":166
+ *         '''set item at idx index.'''
+ *         cdef int idx = index
+ *         if idx < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
+ *         if idx >= self.nfields:
+ *             raise IndexError( "list index out of range" )
+ */
+  __pyx_t_2 = (__pyx_v_idx < 0);
+  if (__pyx_t_2) {
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "TabProxies.pyx":167
+ *         cdef int idx = index
+ *         if idx < 0: raise IndexError( "list index out of range" )
+ *         if idx >= self.nfields:             # <<<<<<<<<<<<<<
+ *             raise IndexError( "list index out of range" )
+ * 
+ */
+  __pyx_t_2 = (__pyx_v_idx >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
+  if (__pyx_t_2) {
+
+    /* "TabProxies.pyx":168
+ *         if idx < 0: raise IndexError( "list index out of range" )
+ *         if idx >= self.nfields:
+ *             raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
+ * 
+ *         if isNew( self.fields[idx], self.data, self.nbytes ):
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":161
+  /* "TabProxies.pyx":170
  *             raise IndexError( "list index out of range" )
  * 
  *         if isNew( self.fields[idx], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
@@ -2209,7 +2448,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
   __pyx_t_1 = __pyx_f_10TabProxies_isNew((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]), ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes);
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":162
+    /* "TabProxies.pyx":171
  * 
  *         if isNew( self.fields[idx], self.data, self.nbytes ):
  *             free( self.fields[idx] )             # <<<<<<<<<<<<<<
@@ -2221,7 +2460,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":164
+  /* "TabProxies.pyx":173
  *             free( self.fields[idx] )
  * 
  *         self.is_modified = 1             # <<<<<<<<<<<<<<
@@ -2230,20 +2469,20 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":166
+  /* "TabProxies.pyx":175
  *         self.is_modified = 1
  * 
  *         if value == None:             # <<<<<<<<<<<<<<
  *             self.fields[idx] = NULL
  *             return
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_2) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":167
+    /* "TabProxies.pyx":176
  * 
  *         if value == None:
  *             self.fields[idx] = NULL             # <<<<<<<<<<<<<<
@@ -2252,7 +2491,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
  */
     (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) = NULL;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":168
+    /* "TabProxies.pyx":177
  *         if value == None:
  *             self.fields[idx] = NULL
  *             return             # <<<<<<<<<<<<<<
@@ -2266,17 +2505,17 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":171
+  /* "TabProxies.pyx":180
  * 
  *         # conversion with error checking
  *         cdef char * tmp = PyString_AsString( value )             # <<<<<<<<<<<<<<
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
  *         if self.fields[idx] == NULL:
  */
-  __pyx_t_5 = PyString_AsString(__pyx_v_value); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_tmp = __pyx_t_5;
+  __pyx_t_4 = PyString_AsString(__pyx_v_value); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_tmp = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":172
+  /* "TabProxies.pyx":181
  *         # conversion with error checking
  *         cdef char * tmp = PyString_AsString( value )
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )             # <<<<<<<<<<<<<<
@@ -2285,7 +2524,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
  */
   (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) = ((char *)malloc(((strlen(__pyx_v_tmp) + 1) * (sizeof(char)))));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":173
+  /* "TabProxies.pyx":182
  *         cdef char * tmp = PyString_AsString( value )
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
  *         if self.fields[idx] == NULL:             # <<<<<<<<<<<<<<
@@ -2295,29 +2534,23 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
   __pyx_t_2 = ((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) == NULL);
   if (__pyx_t_2) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":174
+    /* "TabProxies.pyx":183
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
  *         if self.fields[idx] == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  *         strcpy( self.fields[idx], tmp )
  * 
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L10;
   }
   __pyx_L10:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":175
+  /* "TabProxies.pyx":184
  *         if self.fields[idx] == NULL:
  *             raise ValueError("out of memory" )
  *         strcpy( self.fields[idx], tmp )             # <<<<<<<<<<<<<<
@@ -2330,7 +2563,6 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -2339,7 +2571,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":177
+/* "TabProxies.pyx":186
  *         strcpy( self.fields[idx], tmp )
  * 
  *     def __setitem__(self, index, value ):             # <<<<<<<<<<<<<<
@@ -2347,10 +2579,10 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_
  *         cdef int i = index
  */
 
-static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
-static char __pyx_doc_10TabProxies_10TupleProxy___setitem__[] = "set item at *index* to *value*";
-struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__;
-static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_10TupleProxy_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_10TabProxies_10TupleProxy_5__setitem__[] = "set item at *index* to *value*";
+struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__;
+static int __pyx_pf_10TabProxies_10TupleProxy_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
   int __pyx_v_i;
   int __pyx_r;
   int __pyx_t_1;
@@ -2360,17 +2592,17 @@ static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self
   PyObject *__pyx_t_5 = NULL;
   __Pyx_RefNannySetupContext("__setitem__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":179
+  /* "TabProxies.pyx":188
  *     def __setitem__(self, index, value ):
  *         '''set item at *index* to *value*'''
  *         cdef int i = index             # <<<<<<<<<<<<<<
  *         if i < 0: i += self.nfields
  *         i += self.offset
  */
-  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_i = __pyx_t_1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":180
+  /* "TabProxies.pyx":189
  *         '''set item at *index* to *value*'''
  *         cdef int i = index
  *         if i < 0: i += self.nfields             # <<<<<<<<<<<<<<
@@ -2379,43 +2611,43 @@ static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self
  */
   __pyx_t_2 = (__pyx_v_i < 0);
   if (__pyx_t_2) {
-    __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
+    __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":181
+  /* "TabProxies.pyx":190
  *         cdef int i = index
  *         if i < 0: i += self.nfields
  *         i += self.offset             # <<<<<<<<<<<<<<
  * 
  *         self._setindex( i, value )
  */
-  __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset;
+  __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":183
+  /* "TabProxies.pyx":192
  *         i += self.offset
  * 
  *         self._setindex( i, value )             # <<<<<<<<<<<<<<
  * 
  *     def __len__(self):
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
   __Pyx_GIVEREF(__pyx_t_4);
   __Pyx_INCREF(__pyx_v_value);
   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
   __pyx_r = 0;
@@ -2431,7 +2663,7 @@ static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":185
+/* "TabProxies.pyx":194
  *         self._setindex( i, value )
  * 
  *     def __len__(self):             # <<<<<<<<<<<<<<
@@ -2439,12 +2671,12 @@ static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self
  * 
  */
 
-static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy___len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy___len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy_6__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy_6__len__(PyObject *__pyx_v_self) {
   Py_ssize_t __pyx_r;
   __Pyx_RefNannySetupContext("__len__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":186
+  /* "TabProxies.pyx":195
  * 
  *     def __len__(self):
  *         return self.nfields             # <<<<<<<<<<<<<<
@@ -2460,7 +2692,7 @@ static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy___len__(PyObject *__pyx_v_s
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":188
+/* "TabProxies.pyx":197
  *         return self.nfields
  * 
  *     def __iter__(self):             # <<<<<<<<<<<<<<
@@ -2468,12 +2700,12 @@ static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy___len__(PyObject *__pyx_v_s
  *         return self
  */
 
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_7__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_7__iter__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannySetupContext("__iter__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":189
+  /* "TabProxies.pyx":198
  * 
  *     def __iter__(self):
  *         self.index = 0             # <<<<<<<<<<<<<<
@@ -2482,7 +2714,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_s
  */
   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":190
+  /* "TabProxies.pyx":199
  *     def __iter__(self):
  *         self.index = 0
  *         return self             # <<<<<<<<<<<<<<
@@ -2501,7 +2733,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_s
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":192
+/* "TabProxies.pyx":201
  *         return self
  * 
  *     def __next__(self):             # <<<<<<<<<<<<<<
@@ -2509,17 +2741,17 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_s
  *         """
  */
 
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_10TabProxies_10TupleProxy___next__[] = "python version of next().\n        ";
-struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy___next__;
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_8__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_10TabProxies_10TupleProxy_8__next__[] = "python version of next().\n        ";
+struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__;
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_8__next__(PyObject *__pyx_v_self) {
   char *__pyx_v_retval;
   PyObject *__pyx_r = NULL;
   int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   __Pyx_RefNannySetupContext("__next__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":195
+  /* "TabProxies.pyx":204
  *         """python version of next().
  *         """
  *         if self.index >= self.nfields:             # <<<<<<<<<<<<<<
@@ -2529,7 +2761,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
   __pyx_t_1 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":196
+    /* "TabProxies.pyx":205
  *         """
  *         if self.index >= self.nfields:
  *             raise StopIteration             # <<<<<<<<<<<<<<
@@ -2537,12 +2769,12 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
  *         self.index += 1
  */
     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":197
+  /* "TabProxies.pyx":206
  *         if self.index >= self.nfields:
  *             raise StopIteration
  *         cdef char * retval = self.fields[self.index]             # <<<<<<<<<<<<<<
@@ -2551,16 +2783,16 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
  */
   __pyx_v_retval = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index]);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":198
+  /* "TabProxies.pyx":207
  *             raise StopIteration
  *         cdef char * retval = self.fields[self.index]
  *         self.index += 1             # <<<<<<<<<<<<<<
  *         if retval == NULL: return None
  *         else: return retval
  */
-  ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index += 1;
+  ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index + 1);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":199
+  /* "TabProxies.pyx":208
  *         cdef char * retval = self.fields[self.index]
  *         self.index += 1
  *         if retval == NULL: return None             # <<<<<<<<<<<<<<
@@ -2577,7 +2809,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":200
+    /* "TabProxies.pyx":209
  *         self.index += 1
  *         if retval == NULL: return None
  *         else: return retval             # <<<<<<<<<<<<<<
@@ -2585,7 +2817,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
  *     def __str__(self):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_retval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyBytes_FromString(__pyx_v_retval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __pyx_r = ((PyObject *)__pyx_t_2);
     __pyx_t_2 = 0;
@@ -2605,7 +2837,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":202
+/* "TabProxies.pyx":211
  *         else: return retval
  * 
  *     def __str__(self):             # <<<<<<<<<<<<<<
@@ -2613,10 +2845,10 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_s
  *         # copy and replace \0 bytes with \t characters
  */
 
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_10TabProxies_10TupleProxy___str__[] = "return original data";
-struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy___str__;
-static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_9__str__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_10TabProxies_10TupleProxy_9__str__[] = "return original data";
+struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__;
+static PyObject *__pyx_pf_10TabProxies_10TupleProxy_9__str__(PyObject *__pyx_v_self) {
   char *__pyx_v_cpy;
   long __pyx_v_x;
   PyObject *__pyx_v_result;
@@ -2630,7 +2862,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
   __Pyx_RefNannySetupContext("__str__");
   __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":205
+  /* "TabProxies.pyx":214
  *         '''return original data'''
  *         # copy and replace \0 bytes with \t characters
  *         if self.is_modified:             # <<<<<<<<<<<<<<
@@ -2639,7 +2871,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
  */
   if (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":207
+    /* "TabProxies.pyx":216
  *         if self.is_modified:
  *             # todo: treat NULL values
  *             return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )             # <<<<<<<<<<<<<<
@@ -2647,28 +2879,28 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __pyx_t_3 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
       __pyx_v_x = __pyx_t_4;
-      __pyx_t_5 = PyBytes_FromString(__pyx_f_10TabProxies_StrOrEmpty((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyBytes_FromString(__pyx_f_10TabProxies_StrOrEmpty((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     }
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_INCREF(((PyObject *)__pyx_t_2));
     PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, __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_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
@@ -2676,7 +2908,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":209
+    /* "TabProxies.pyx":218
  *             return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )
  *         else:
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )             # <<<<<<<<<<<<<<
@@ -2685,7 +2917,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
  */
     __pyx_v_cpy = ((char *)calloc((sizeof(char)), (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes + 1)));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":210
+    /* "TabProxies.pyx":219
  *         else:
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
  *             if cpy == NULL:             # <<<<<<<<<<<<<<
@@ -2695,29 +2927,23 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
     __pyx_t_6 = (__pyx_v_cpy == NULL);
     if (__pyx_t_6) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":211
+      /* "TabProxies.pyx":220
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
  *             if cpy == NULL:
  *                 raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  *             memcpy( cpy, self.data, self.nbytes+1)
  *             for x from 0 <= x < self.nbytes:
  */
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_Raise(__pyx_t_2, 0, 0);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_5, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L8;
     }
     __pyx_L8:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":212
+    /* "TabProxies.pyx":221
  *             if cpy == NULL:
  *                 raise ValueError("out of memory" )
  *             memcpy( cpy, self.data, self.nbytes+1)             # <<<<<<<<<<<<<<
@@ -2726,7 +2952,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
  */
     memcpy(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes + 1));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":213
+    /* "TabProxies.pyx":222
  *                 raise ValueError("out of memory" )
  *             memcpy( cpy, self.data, self.nbytes+1)
  *             for x from 0 <= x < self.nbytes:             # <<<<<<<<<<<<<<
@@ -2736,7 +2962,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
     __pyx_t_3 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes;
     for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":214
+      /* "TabProxies.pyx":223
  *             memcpy( cpy, self.data, self.nbytes+1)
  *             for x from 0 <= x < self.nbytes:
  *                 if cpy[x] == '\0': cpy[x] = '\t'             # <<<<<<<<<<<<<<
@@ -2751,20 +2977,20 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
       __pyx_L11:;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":215
+    /* "TabProxies.pyx":224
  *             for x from 0 <= x < self.nbytes:
  *                 if cpy[x] == '\0': cpy[x] = '\t'
  *             result = PyString_FromStringAndSize(cpy, self.nbytes)             # <<<<<<<<<<<<<<
  *             free(cpy)
  *             return result
  */
-    __pyx_t_5 = PyString_FromStringAndSize(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = PyString_FromStringAndSize(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_v_result);
-    __pyx_v_result = __pyx_t_5;
-    __pyx_t_5 = 0;
+    __pyx_v_result = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":216
+    /* "TabProxies.pyx":225
  *                 if cpy[x] == '\0': cpy[x] = '\t'
  *             result = PyString_FromStringAndSize(cpy, self.nbytes)
  *             free(cpy)             # <<<<<<<<<<<<<<
@@ -2773,7 +2999,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
  */
     free(__pyx_v_cpy);
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":217
+    /* "TabProxies.pyx":226
  *             result = PyString_FromStringAndSize(cpy, self.nbytes)
  *             free(cpy)
  *             return result             # <<<<<<<<<<<<<<
@@ -2802,7 +3028,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":219
+/* "TabProxies.pyx":228
  *             return result
  * 
  * def toDot( v ):             # <<<<<<<<<<<<<<
@@ -2812,6 +3038,7 @@ static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_se
 
 static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
 static char __pyx_doc_10TabProxies_toDot[] = "convert value to '.' if None";
+static PyMethodDef __pyx_mdef_10TabProxies_toDot = {__Pyx_NAMESTR("toDot"), (PyCFunction)__pyx_pf_10TabProxies_toDot, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_toDot)};
 static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
@@ -2820,27 +3047,27 @@ static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__p
   __Pyx_RefNannySetupContext("toDot");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":221
+  /* "TabProxies.pyx":230
  * def toDot( v ):
  *     '''convert value to '.' if None'''
  *     if v == None: return "."             # <<<<<<<<<<<<<<
  *     else: return str(v)
  * 
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __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 = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
     __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-    __pyx_r = ((PyObject *)__pyx_kp_s_8);
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
+    __pyx_r = ((PyObject *)__pyx_kp_s_16);
     goto __pyx_L0;
     goto __pyx_L5;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":222
+    /* "TabProxies.pyx":231
  *     '''convert value to '.' if None'''
  *     if v == None: return "."
  *     else: return str(v)             # <<<<<<<<<<<<<<
@@ -2848,14 +3075,14 @@ static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__p
  * def quote( v ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     __Pyx_INCREF(__pyx_v_v);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v);
     __Pyx_GIVEREF(__pyx_v_v);
-    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
     __pyx_r = __pyx_t_3;
     __pyx_t_3 = 0;
     goto __pyx_L0;
@@ -2875,7 +3102,7 @@ static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":224
+/* "TabProxies.pyx":233
  *     else: return str(v)
  * 
  * def quote( v ):             # <<<<<<<<<<<<<<
@@ -2883,9 +3110,10 @@ static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__p
  *     if type(v) in types.StringTypes:
  */
 
-static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
-static char __pyx_doc_10TabProxies_quote[] = "return a quoted attribute.";
-static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__pyx_v_v) {
+static PyObject *__pyx_pf_10TabProxies_1quote(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
+static char __pyx_doc_10TabProxies_1quote[] = "return a quoted attribute.";
+static PyMethodDef __pyx_mdef_10TabProxies_1quote = {__Pyx_NAMESTR("quote"), (PyCFunction)__pyx_pf_10TabProxies_1quote, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_1quote)};
+static PyObject *__pyx_pf_10TabProxies_1quote(PyObject *__pyx_self, PyObject *__pyx_v_v) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
@@ -2893,23 +3121,23 @@ static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__p
   __Pyx_RefNannySetupContext("quote");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":226
+  /* "TabProxies.pyx":235
  * def quote( v ):
  *     '''return a quoted attribute.'''
  *     if type(v) in types.StringTypes:             # <<<<<<<<<<<<<<
  *         return '"%s"' % v
  *     else:
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__StringTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__StringTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = ((PySequence_Contains(__pyx_t_2, ((PyObject *)Py_TYPE(__pyx_v_v))))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((PySequence_Contains(__pyx_t_2, ((PyObject *)Py_TYPE(__pyx_v_v))))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":227
+    /* "TabProxies.pyx":236
  *     '''return a quoted attribute.'''
  *     if type(v) in types.StringTypes:
  *         return '"%s"' % v             # <<<<<<<<<<<<<<
@@ -2917,7 +3145,7 @@ static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__p
  *         return str(v)
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __pyx_r = ((PyObject *)__pyx_t_2);
     __pyx_t_2 = 0;
@@ -2926,7 +3154,7 @@ static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__p
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":229
+    /* "TabProxies.pyx":238
  *         return '"%s"' % v
  *     else:
  *         return str(v)             # <<<<<<<<<<<<<<
@@ -2934,14 +3162,14 @@ static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__p
  * cdef class GTFProxy( TupleProxy ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_v);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
     __Pyx_GIVEREF(__pyx_v_v);
-    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
@@ -2961,7 +3189,7 @@ static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":245
+/* "TabProxies.pyx":254
  *     '''
  * 
  *     def __cinit__(self ):             # <<<<<<<<<<<<<<
@@ -2977,7 +3205,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyO
     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":247
+  /* "TabProxies.pyx":256
  *     def __cinit__(self ):
  *         # automatically calls TupleProxy.__cinit__
  *         self.hasOwnAttributes = False             # <<<<<<<<<<<<<<
@@ -2991,7 +3219,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyO
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":249
+/* "TabProxies.pyx":258
  *         self.hasOwnAttributes = False
  * 
  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
@@ -2999,11 +3227,11 @@ static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyO
  *         if self.hasOwnAttributes:
  */
 
-static void __pyx_pf_10TabProxies_8GTFProxy___dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pf_10TabProxies_8GTFProxy___dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pf_10TabProxies_8GTFProxy_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pf_10TabProxies_8GTFProxy_1__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannySetupContext("__dealloc__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":251
+  /* "TabProxies.pyx":260
  *     def __dealloc__(self):
  *         # automatically calls TupleProxy.__dealloc__
  *         if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
@@ -3012,7 +3240,7 @@ static void __pyx_pf_10TabProxies_8GTFProxy___dealloc__(PyObject *__pyx_v_self)
  */
   if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":252
+    /* "TabProxies.pyx":261
  *         # automatically calls TupleProxy.__dealloc__
  *         if self.hasOwnAttributes:
  *             free(self.attributes)             # <<<<<<<<<<<<<<
@@ -3027,7 +3255,7 @@ static void __pyx_pf_10TabProxies_8GTFProxy___dealloc__(PyObject *__pyx_v_self)
   __Pyx_RefNannyFinishContext();
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":254
+/* "TabProxies.pyx":263
  *             free(self.attributes)
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -3039,7 +3267,7 @@ static  int __pyx_f_10TabProxies_8GTFProxy_getMaxFields(struct __pyx_obj_10TabPr
   int __pyx_r;
   __Pyx_RefNannySetupContext("getMaxFields");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":256
+  /* "TabProxies.pyx":265
  *     cdef int getMaxFields( self, size_t nbytes ):
  *         '''return max number of fields.'''
  *         return 9             # <<<<<<<<<<<<<<
@@ -3055,7 +3283,7 @@ static  int __pyx_f_10TabProxies_8GTFProxy_getMaxFields(struct __pyx_obj_10TabPr
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":258
+/* "TabProxies.pyx":267
  *         return 9
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -3074,7 +3302,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   char *__pyx_t_4;
   __Pyx_RefNannySetupContext("update");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":265
+  /* "TabProxies.pyx":274
  *         cdef int end
  *         cdef char * cstart, * cend, * cscore
  *         self.contig = buffer             # <<<<<<<<<<<<<<
@@ -3083,7 +3311,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
  */
   __pyx_v_self->contig = __pyx_v_buffer;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":268
+  /* "TabProxies.pyx":277
  *         cdef char * pos
  * 
  *         if buffer[nbytes] != 0:             # <<<<<<<<<<<<<<
@@ -3093,34 +3321,34 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":269
+    /* "TabProxies.pyx":278
  * 
  *         if buffer[nbytes] != 0:
  *             raise ValueError( "incomplete line at %s" % buffer )             # <<<<<<<<<<<<<<
  * 
  *         self.source = pos = nextItem( buffer )
  */
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_DECREF(((PyObject *)__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 = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":271
+  /* "TabProxies.pyx":280
  *             raise ValueError( "incomplete line at %s" % buffer )
  * 
  *         self.source = pos = nextItem( buffer )             # <<<<<<<<<<<<<<
@@ -3131,7 +3359,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_self->source = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":272
+  /* "TabProxies.pyx":281
  * 
  *         self.source = pos = nextItem( buffer )
  *         self.feature = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3142,7 +3370,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_self->feature = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":273
+  /* "TabProxies.pyx":282
  *         self.source = pos = nextItem( buffer )
  *         self.feature = pos = nextItem( pos )
  *         cstart = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3153,7 +3381,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_cstart = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":274
+  /* "TabProxies.pyx":283
  *         self.feature = pos = nextItem( pos )
  *         cstart = pos = nextItem( pos )
  *         cend = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3164,7 +3392,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_cend = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":275
+  /* "TabProxies.pyx":284
  *         cstart = pos = nextItem( pos )
  *         cend = pos = nextItem( pos )
  *         self.score = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3175,7 +3403,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_self->score = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":276
+  /* "TabProxies.pyx":285
  *         cend = pos = nextItem( pos )
  *         self.score = pos = nextItem( pos )
  *         self.strand = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3186,7 +3414,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_self->strand = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":277
+  /* "TabProxies.pyx":286
  *         self.score = pos = nextItem( pos )
  *         self.strand = pos = nextItem( pos )
  *         self.frame = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3197,7 +3425,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_self->frame = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":278
+  /* "TabProxies.pyx":287
  *         self.strand = pos = nextItem( pos )
  *         self.frame = pos = nextItem( pos )
  *         self.attributes = pos = nextItem( pos )             # <<<<<<<<<<<<<<
@@ -3208,24 +3436,33 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   __pyx_v_self->attributes = __pyx_t_4;
   __pyx_v_pos = __pyx_t_4;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":280
+  /* "TabProxies.pyx":289
  *         self.attributes = pos = nextItem( pos )
  * 
  *         self.start = atoi( cstart ) - 1             # <<<<<<<<<<<<<<
  *         self.end = atoi( cend )
- * 
+ *         self.nfields = 9
  */
   __pyx_v_self->start = (atoi(__pyx_v_cstart) - 1);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":281
+  /* "TabProxies.pyx":290
  * 
  *         self.start = atoi( cstart ) - 1
  *         self.end = atoi( cend )             # <<<<<<<<<<<<<<
+ *         self.nfields = 9
  * 
- *     property contig:
  */
   __pyx_v_self->end = atoi(__pyx_v_cend);
 
+  /* "TabProxies.pyx":291
+ *         self.start = atoi( cstart ) - 1
+ *         self.end = atoi( cend )
+ *         self.nfields = 9             # <<<<<<<<<<<<<<
+ * 
+ *     property contig:
+ */
+  __pyx_v_self->__pyx_base.nfields = 9;
+
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -3239,7 +3476,7 @@ static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabPr
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":285
+/* "TabProxies.pyx":295
  *     property contig:
  *        '''contig of feature.'''
  *        def __get__( self ): return self.contig             # <<<<<<<<<<<<<<
@@ -3253,7 +3490,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
@@ -3271,7 +3508,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":286
+/* "TabProxies.pyx":296
  *        '''contig of feature.'''
  *        def __get__( self ): return self.contig
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3279,13 +3516,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx
  *            self.contig = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_6contig_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_6contig_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":287
+  /* "TabProxies.pyx":297
  *        def __get__( self ): return self.contig
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3294,14 +3531,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(PyObject *__pyx_v_sel
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":288
+  /* "TabProxies.pyx":298
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.contig = value             # <<<<<<<<<<<<<<
  * 
  *     property feature:
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3314,7 +3551,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(PyObject *__pyx_v_sel
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":292
+/* "TabProxies.pyx":302
  *     property feature:
  *        '''feature name.'''
  *        def __get__( self ): return self.feature             # <<<<<<<<<<<<<<
@@ -3328,7 +3565,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__py
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
@@ -3346,7 +3583,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__py
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":293
+/* "TabProxies.pyx":303
  *        '''feature name.'''
  *        def __get__( self ): return self.feature
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3354,13 +3591,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__py
  *            self.feature = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_7feature_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_7feature_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":294
+  /* "TabProxies.pyx":304
  *        def __get__( self ): return self.feature
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3369,14 +3606,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(PyObject *__pyx_v_se
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":295
+  /* "TabProxies.pyx":305
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.feature = value             # <<<<<<<<<<<<<<
  * 
  *     property source:
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3389,7 +3626,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(PyObject *__pyx_v_se
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":299
+/* "TabProxies.pyx":309
  *     property source:
  *        '''feature source.'''
  *        def __get__( self ): return self.source             # <<<<<<<<<<<<<<
@@ -3403,7 +3640,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
@@ -3421,7 +3658,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":300
+/* "TabProxies.pyx":310
  *        '''feature source.'''
  *        def __get__( self ): return self.source
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3429,13 +3666,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx
  *            self.source = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_6source___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_6source___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_6source_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_6source_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":301
+  /* "TabProxies.pyx":311
  *        def __get__( self ): return self.source
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3444,14 +3681,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_6source___set__(PyObject *__pyx_v_sel
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":302
+  /* "TabProxies.pyx":312
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.source = value             # <<<<<<<<<<<<<<
  * 
  *     property start:
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3464,7 +3701,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_6source___set__(PyObject *__pyx_v_sel
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":306
+/* "TabProxies.pyx":316
  *     property start:
  *        '''feature start (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return self.start             # <<<<<<<<<<<<<<
@@ -3478,7 +3715,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
@@ -3496,7 +3733,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":307
+/* "TabProxies.pyx":317
  *        '''feature start (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return self.start
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3504,13 +3741,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_
  *            self.start = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_5start___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_5start___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_5start_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_5start_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   uint32_t __pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":308
+  /* "TabProxies.pyx":318
  *        def __get__( self ): return self.start
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3519,14 +3756,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_5start___set__(PyObject *__pyx_v_self
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":309
+  /* "TabProxies.pyx":319
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.start = value             # <<<<<<<<<<<<<<
  * 
  *     property end:
  */
-  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3539,7 +3776,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_5start___set__(PyObject *__pyx_v_self
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":313
+/* "TabProxies.pyx":323
  *     property end:
  *        '''feature end (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return self.end             # <<<<<<<<<<<<<<
@@ -3553,7 +3790,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
@@ -3571,7 +3808,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":314
+/* "TabProxies.pyx":324
  *        '''feature end (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return self.end
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3579,13 +3816,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_
  *            self.end = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_3end___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_3end___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_3end_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_3end_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   uint32_t __pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":315
+  /* "TabProxies.pyx":325
  *        def __get__( self ): return self.end
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3594,14 +3831,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_3end___set__(PyObject *__pyx_v_self,
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":316
+  /* "TabProxies.pyx":326
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.end = value             # <<<<<<<<<<<<<<
  * 
  *     property score:
  */
-  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3614,7 +3851,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_3end___set__(PyObject *__pyx_v_self,
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":320
+/* "TabProxies.pyx":330
  *     property score:
  *        '''feature score.'''
  *        def __get__( self ):             # <<<<<<<<<<<<<<
@@ -3631,7 +3868,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_
   PyObject *__pyx_t_4 = NULL;
   __Pyx_RefNannySetupContext("__get__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":321
+  /* "TabProxies.pyx":331
  *        '''feature score.'''
  *        def __get__( self ):
  *            if self.score[0] == '.' and self.score[1] == '\0' :             # <<<<<<<<<<<<<<
@@ -3647,7 +3884,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_
   }
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":322
+    /* "TabProxies.pyx":332
  *        def __get__( self ):
  *            if self.score[0] == '.' and self.score[1] == '\0' :
  *                return None             # <<<<<<<<<<<<<<
@@ -3662,7 +3899,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":324
+    /* "TabProxies.pyx":334
  *                return None
  *            else:
  *                return atof(self.score)             # <<<<<<<<<<<<<<
@@ -3670,7 +3907,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_
  *            self.is_modified = True
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_4 = PyFloat_FromDouble(atof(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyFloat_FromDouble(atof(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_r = __pyx_t_4;
     __pyx_t_4 = 0;
@@ -3690,7 +3927,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":325
+/* "TabProxies.pyx":335
  *            else:
  *                return atof(self.score)
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3698,13 +3935,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_
  *            self.score = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_5score___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_5score___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_5score_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_5score_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":326
+  /* "TabProxies.pyx":336
  *                return atof(self.score)
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3713,14 +3950,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_5score___set__(PyObject *__pyx_v_self
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":327
+  /* "TabProxies.pyx":337
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.score = value             # <<<<<<<<<<<<<<
  * 
  *     property strand:
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3733,7 +3970,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_5score___set__(PyObject *__pyx_v_self
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":331
+/* "TabProxies.pyx":341
  *     property strand:
  *        '''feature strand.'''
  *        def __get__( self ): return self.strand             # <<<<<<<<<<<<<<
@@ -3747,7 +3984,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
@@ -3765,7 +4002,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":332
+/* "TabProxies.pyx":342
  *        '''feature strand.'''
  *        def __get__( self ): return self.strand
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3773,13 +4010,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx
  *            self.strand = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_6strand_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_6strand_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":333
+  /* "TabProxies.pyx":343
  *        def __get__( self ): return self.strand
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3788,14 +4025,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(PyObject *__pyx_v_sel
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":334
+  /* "TabProxies.pyx":344
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.strand = value             # <<<<<<<<<<<<<<
  * 
  *     property frame:
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3808,7 +4045,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(PyObject *__pyx_v_sel
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":338
+/* "TabProxies.pyx":348
  *     property frame:
  *        '''feature frame.'''
  *        def __get__( self ): return self.frame             # <<<<<<<<<<<<<<
@@ -3822,7 +4059,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
@@ -3840,7 +4077,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":339
+/* "TabProxies.pyx":349
  *        '''feature frame.'''
  *        def __get__( self ): return self.frame
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3848,13 +4085,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_
  *            self.frame = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_5frame_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_5frame_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":340
+  /* "TabProxies.pyx":350
  *        def __get__( self ): return self.frame
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3863,14 +4100,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(PyObject *__pyx_v_self
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":341
+  /* "TabProxies.pyx":351
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.frame = value             # <<<<<<<<<<<<<<
  * 
  *     property attributes:
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3883,7 +4120,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(PyObject *__pyx_v_self
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":345
+/* "TabProxies.pyx":355
  *     property attributes:
  *        '''feature attributes (as a string).'''
  *        def __get__( self ): return self.attributes             # <<<<<<<<<<<<<<
@@ -3897,7 +4134,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
@@ -3915,7 +4152,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":346
+/* "TabProxies.pyx":356
  *        '''feature attributes (as a string).'''
  *        def __get__( self ): return self.attributes
  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
@@ -3923,13 +4160,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *
  *            self.attributes = value
  */
 
-static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8GTFProxy_10attributes_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_10TabProxies_8GTFProxy_10attributes_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   char *__pyx_t_1;
   __Pyx_RefNannySetupContext("__set__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":347
+  /* "TabProxies.pyx":357
  *        def __get__( self ): return self.attributes
  *        def __set__( self, value ):
  *            self.is_modified = True             # <<<<<<<<<<<<<<
@@ -3938,14 +4175,14 @@ static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":348
+  /* "TabProxies.pyx":358
  *        def __set__( self, value ):
  *            self.is_modified = True
  *            self.attributes = value             # <<<<<<<<<<<<<<
  * 
  *     def asDict( self ):
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes = __pyx_t_1;
 
   __pyx_r = 0;
@@ -3958,7 +4195,7 @@ static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":350
+/* "TabProxies.pyx":360
  *            self.attributes = value
  * 
  *     def asDict( self ):             # <<<<<<<<<<<<<<
@@ -3966,9 +4203,9 @@ static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_
  *         """
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_10TabProxies_8GTFProxy_asDict[] = "parse attributes - return as dict\n        ";
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_2asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_10TabProxies_8GTFProxy_2asDict[] = "parse attributes - return as dict\n        ";
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_2asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   char *__pyx_v_attributes;
   PyObject *__pyx_v_fields;
   PyObject *__pyx_v_result;
@@ -3991,15 +4228,15 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
   double __pyx_t_11;
   int __pyx_t_12;
   __Pyx_RefNannySetupContext("asDict");
-  __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
-  __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_fields = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_d = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_d = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_n = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":355
+  /* "TabProxies.pyx":365
  * 
  *         # remove comments
  *         attributes = self.attributes             # <<<<<<<<<<<<<<
@@ -4008,181 +4245,168 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
  */
   __pyx_v_attributes = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":358
+  /* "TabProxies.pyx":368
  * 
  *         # separate into fields
  *         fields = [ x.strip() for x in attributes.split(";")[:-1]]             # <<<<<<<<<<<<<<
  * 
  *         result = {}
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_3 = PyBytes_FromString(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyBytes_FromString(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_10));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
-  __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_t_3, 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PySequence_GetSlice(__pyx_t_5, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
-    __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5);
+  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3);
   } else {
-    __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
   }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_5))) {
-      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
-      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
+    if (likely(PyList_CheckExact(__pyx_t_3))) {
+      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
+      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
     } else {
-      __pyx_t_3 = PyIter_Next(__pyx_t_5);
-      if (!__pyx_t_3) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyIter_Next(__pyx_t_3);
+      if (!__pyx_t_4) {
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(__pyx_t_4);
     }
     __Pyx_DECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_x = __pyx_t_4;
+    __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_INCREF(((PyObject *)__pyx_t_1));
   __Pyx_DECREF(((PyObject *)__pyx_v_fields));
   __pyx_v_fields = __pyx_t_1;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":360
+  /* "TabProxies.pyx":370
  *         fields = [ x.strip() for x in attributes.split(";")[:-1]]
  * 
  *         result = {}             # <<<<<<<<<<<<<<
  * 
  *         for f in fields:
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_DECREF(((PyObject *)__pyx_v_result));
   __pyx_v_result = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":362
+  /* "TabProxies.pyx":372
  *         result = {}
  * 
  *         for f in fields:             # <<<<<<<<<<<<<<
  * 
  *             d = [ x.strip() for x in f.split(" ")]
  */
-  if (likely(((PyObject *)__pyx_v_fields) != Py_None)) {
-    __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields); __Pyx_INCREF(__pyx_t_1);
-  } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(__pyx_v_fields == Py_None)) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
   }
+  __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields); __Pyx_INCREF(__pyx_t_1);
   for (;;) {
     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
-    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
+    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
     __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_5;
-    __pyx_t_5 = 0;
+    __pyx_v_f = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":364
+    /* "TabProxies.pyx":374
  *         for f in fields:
  * 
  *             d = [ x.strip() for x in f.split(" ")]             # <<<<<<<<<<<<<<
  * 
  *             n,v = d[0], d[1]
  */
-    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_11));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
-    __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
-      __pyx_t_6 = 0; __pyx_t_3 = __pyx_t_7; __Pyx_INCREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
+      __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
     } else {
-      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
     }
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
+      if (likely(PyList_CheckExact(__pyx_t_5))) {
+        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
       } else {
-        __pyx_t_7 = PyIter_Next(__pyx_t_3);
-        if (!__pyx_t_7) {
-          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyIter_Next(__pyx_t_5);
+        if (!__pyx_t_4) {
+          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_GOTREF(__pyx_t_4);
       }
       __Pyx_DECREF(__pyx_v_x);
-      __pyx_v_x = __pyx_t_7;
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_x = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_t_4 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (unlikely(PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (unlikely(PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_INCREF(((PyObject *)__pyx_t_5));
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_INCREF(((PyObject *)__pyx_t_3));
     __Pyx_DECREF(((PyObject *)__pyx_v_d));
-    __pyx_v_d = __pyx_t_5;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+    __pyx_v_d = __pyx_t_3;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":366
+    /* "TabProxies.pyx":376
  *             d = [ x.strip() for x in f.split(" ")]
  * 
  *             n,v = d[0], d[1]             # <<<<<<<<<<<<<<
  *             if len(d) > 2: v = d[1:]
  * 
  */
-    __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_v_n);
-    __pyx_v_n = __pyx_t_5;
-    __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_v_v);
-    __pyx_v_v = __pyx_t_3;
+    __pyx_v_n = __pyx_t_3;
     __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_v_v);
+    __pyx_v_v = __pyx_t_5;
+    __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":367
+    /* "TabProxies.pyx":377
  * 
  *             n,v = d[0], d[1]
  *             if len(d) > 2: v = d[1:]             # <<<<<<<<<<<<<<
@@ -4190,65 +4414,65 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
  *             if v[0] == '"' and v[-1] == '"':
  */
     if (unlikely(__pyx_v_d == Py_None)) {
-      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
+      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
     __pyx_t_6 = PyList_GET_SIZE(((PyObject *)__pyx_v_d)); 
     __pyx_t_8 = (__pyx_t_6 > 2);
     if (__pyx_t_8) {
-      __pyx_t_3 = PySequence_GetSlice(((PyObject *)__pyx_v_d), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+      __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_d), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = ((PyObject *)__pyx_t_3);
-      __pyx_t_3 = 0;
+      __pyx_v_v = ((PyObject *)__pyx_t_5);
+      __pyx_t_5 = 0;
       goto __pyx_L11;
     }
     __pyx_L11:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":369
+    /* "TabProxies.pyx":379
  *             if len(d) > 2: v = d[1:]
  * 
  *             if v[0] == '"' and v[-1] == '"':             # <<<<<<<<<<<<<<
  *                 v = v[1:-1]
  *             else:
  */
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_12), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_22), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_8) {
-      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_12), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_22), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       __pyx_t_10 = __pyx_t_9;
     } else {
       __pyx_t_10 = __pyx_t_8;
     }
     if (__pyx_t_10) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":370
+      /* "TabProxies.pyx":380
  * 
  *             if v[0] == '"' and v[-1] == '"':
  *                 v = v[1:-1]             # <<<<<<<<<<<<<<
  *             else:
  *                 ## try to convert to a value
  */
-      __pyx_t_3 = PySequence_GetSlice(__pyx_v_v, 1, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_v, 1, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_3;
-      __pyx_t_3 = 0;
+      __pyx_v_v = __pyx_t_5;
+      __pyx_t_5 = 0;
       goto __pyx_L12;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":373
+      /* "TabProxies.pyx":383
  *             else:
  *                 ## try to convert to a value
  *                 try:             # <<<<<<<<<<<<<<
@@ -4263,50 +4487,50 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
         __Pyx_XGOTREF(__pyx_save_exc_tb);
         /*try:*/ {
 
-          /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":374
+          /* "TabProxies.pyx":384
  *                 ## try to convert to a value
  *                 try:
  *                     v = float( v )             # <<<<<<<<<<<<<<
  *                     v = int( v )
  *                 except ValueError:
  */
-          __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_11 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-          __pyx_t_3 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_11 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __pyx_t_5 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(__pyx_t_5);
           __Pyx_DECREF(__pyx_v_v);
-          __pyx_v_v = __pyx_t_3;
-          __pyx_t_3 = 0;
+          __pyx_v_v = __pyx_t_5;
+          __pyx_t_5 = 0;
 
-          /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":375
+          /* "TabProxies.pyx":385
  *                 try:
  *                     v = float( v )
  *                     v = int( v )             # <<<<<<<<<<<<<<
  *                 except ValueError:
  *                     pass
  */
-          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(((PyObject *)__pyx_t_5));
           __Pyx_INCREF(__pyx_v_v);
-          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_v);
+          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
           __Pyx_GIVEREF(__pyx_v_v);
-          __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-          __Pyx_GOTREF(__pyx_t_5);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
           __Pyx_DECREF(__pyx_v_v);
-          __pyx_v_v = __pyx_t_5;
-          __pyx_t_5 = 0;
+          __pyx_v_v = __pyx_t_3;
+          __pyx_t_3 = 0;
         }
         __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
         __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
         __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
         goto __pyx_L20_try_end;
         __pyx_L13_error:;
-        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
         __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
         __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":376
+        /* "TabProxies.pyx":386
  *                     v = float( v )
  *                     v = int( v )
  *                 except ValueError:             # <<<<<<<<<<<<<<
@@ -4319,7 +4543,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
           goto __pyx_L14_exception_handled;
         }
 
-        /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":378
+        /* "TabProxies.pyx":388
  *                 except ValueError:
  *                     pass
  *                 except TypeError:             # <<<<<<<<<<<<<<
@@ -4346,18 +4570,18 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
     }
     __pyx_L12:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":381
+    /* "TabProxies.pyx":391
  *                     pass
  * 
  *             result[n] = v             # <<<<<<<<<<<<<<
  * 
  *         return result
  */
-    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_n, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_n, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":383
+  /* "TabProxies.pyx":393
  *             result[n] = v
  * 
  *         return result             # <<<<<<<<<<<<<<
@@ -4392,7 +4616,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":385
+/* "TabProxies.pyx":395
  *         return result
  * 
  *     def fromDict( self, d ):             # <<<<<<<<<<<<<<
@@ -4400,9 +4624,9 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self,
  *         cdef char * p
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/
-static char __pyx_doc_10TabProxies_8GTFProxy_fromDict[] = "set attributes from a dictionary.";
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/
+static char __pyx_doc_10TabProxies_8GTFProxy_3fromDict[] = "set attributes from a dictionary.";
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d) {
   char *__pyx_v_p;
   int __pyx_v_l;
   PyObject *__pyx_v_aa;
@@ -4420,12 +4644,12 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
   int __pyx_t_8;
   char *__pyx_t_9;
   __Pyx_RefNannySetupContext("fromDict");
-  __pyx_v_aa = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_aa = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_a = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":391
+  /* "TabProxies.pyx":401
  * 
  *         # clean up if this field is set twice
  *         if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
@@ -4434,7 +4658,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  */
   if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":392
+    /* "TabProxies.pyx":402
  *         # clean up if this field is set twice
  *         if self.hasOwnAttributes:
  *             free(self.attributes)             # <<<<<<<<<<<<<<
@@ -4446,35 +4670,35 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":394
+  /* "TabProxies.pyx":404
  *             free(self.attributes)
  * 
  *         aa = []             # <<<<<<<<<<<<<<
  *         for k,v in d.items():
  *             if type(v) == types.StringType:
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_DECREF(((PyObject *)__pyx_v_aa));
   __pyx_v_aa = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":395
+  /* "TabProxies.pyx":405
  * 
  *         aa = []
  *         for k,v in d.items():             # <<<<<<<<<<<<<<
  *             if type(v) == types.StringType:
  *                 aa.append( '%s "%s"' % (k,v) )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
     __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -4488,7 +4712,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
     } else {
       __pyx_t_3 = PyIter_Next(__pyx_t_1);
       if (!__pyx_t_3) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
       __Pyx_GOTREF(__pyx_t_3);
@@ -4505,14 +4729,14 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
       __pyx_v_v = __pyx_t_5;
       __pyx_t_5 = 0;
     } else {
-      __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_DECREF(__pyx_v_k);
       __pyx_v_k = __pyx_t_4;
@@ -4522,26 +4746,26 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
       __pyx_t_5 = 0;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":396
+    /* "TabProxies.pyx":406
  *         aa = []
  *         for k,v in d.items():
  *             if type(v) == types.StringType:             # <<<<<<<<<<<<<<
  *                 aa.append( '%s "%s"' % (k,v) )
  *             else:
  */
-    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__StringType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__StringType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_7) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":397
+      /* "TabProxies.pyx":407
  *         for k,v in d.items():
  *             if type(v) == types.StringType:
  *                 aa.append( '%s "%s"' % (k,v) )             # <<<<<<<<<<<<<<
@@ -4549,26 +4773,26 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  *                 aa.append( '%s %s' % (k,str(v)) )
  */
       if (unlikely(__pyx_v_aa == Py_None)) {
-        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
+        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
-      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       __Pyx_INCREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
       __Pyx_INCREF(__pyx_v_v);
       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_aa), ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+      __pyx_t_8 = PyList_Append(__pyx_v_aa, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
       goto __pyx_L8;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":399
+      /* "TabProxies.pyx":409
  *                 aa.append( '%s "%s"' % (k,v) )
  *             else:
  *                 aa.append( '%s %s' % (k,str(v)) )             # <<<<<<<<<<<<<<
@@ -4576,80 +4800,80 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  *         a = "; ".join( aa ) + ";"
  */
       if (unlikely(__pyx_v_aa == Py_None)) {
-        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
+        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __Pyx_INCREF(__pyx_v_v);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __Pyx_INCREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_aa), ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+      __pyx_t_8 = PyList_Append(__pyx_v_aa, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     }
     __pyx_L8:;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":401
+  /* "TabProxies.pyx":411
  *                 aa.append( '%s %s' % (k,str(v)) )
  * 
  *         a = "; ".join( aa ) + ";"             # <<<<<<<<<<<<<<
  *         p = a
  *         l = len(a)
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_15), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_25), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   __Pyx_INCREF(((PyObject *)__pyx_v_aa));
   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_aa));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_aa));
-  __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __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_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_3 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   __Pyx_DECREF(__pyx_v_a);
   __pyx_v_a = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":402
+  /* "TabProxies.pyx":412
  * 
  *         a = "; ".join( aa ) + ";"
  *         p = a             # <<<<<<<<<<<<<<
  *         l = len(a)
  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
  */
-  __pyx_t_9 = PyBytes_AsString(__pyx_v_a); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = PyBytes_AsString(__pyx_v_a); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_p = __pyx_t_9;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":403
+  /* "TabProxies.pyx":413
  *         a = "; ".join( aa ) + ";"
  *         p = a
  *         l = len(a)             # <<<<<<<<<<<<<<
  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
  *         if self.attributes == NULL:
  */
-  __pyx_t_2 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_l = __pyx_t_2;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":404
+  /* "TabProxies.pyx":414
  *         p = a
  *         l = len(a)
  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )             # <<<<<<<<<<<<<<
@@ -4658,7 +4882,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes = ((char *)calloc((__pyx_v_l + 1), (sizeof(char))));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":405
+  /* "TabProxies.pyx":415
  *         l = len(a)
  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
  *         if self.attributes == NULL:             # <<<<<<<<<<<<<<
@@ -4668,29 +4892,23 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
   __pyx_t_7 = (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes == NULL);
   if (__pyx_t_7) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":406
+    /* "TabProxies.pyx":416
  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
  *         if self.attributes == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  *         memcpy( self.attributes, p, l )
  * 
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_5, 0, 0);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L9;
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":407
+  /* "TabProxies.pyx":417
  *         if self.attributes == NULL:
  *             raise ValueError("out of memory" )
  *         memcpy( self.attributes, p, l )             # <<<<<<<<<<<<<<
@@ -4699,7 +4917,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  */
   memcpy(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_p, __pyx_v_l);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":409
+  /* "TabProxies.pyx":419
  *         memcpy( self.attributes, p, l )
  * 
  *         self.hasOwnAttributes = True             # <<<<<<<<<<<<<<
@@ -4708,7 +4926,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  */
   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":410
+  /* "TabProxies.pyx":420
  * 
  *         self.hasOwnAttributes = True
  *         self.is_modified = True             # <<<<<<<<<<<<<<
@@ -4737,7 +4955,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":412
+/* "TabProxies.pyx":422
  *         self.is_modified = True
  * 
  *     def __str__(self):             # <<<<<<<<<<<<<<
@@ -4745,8 +4963,8 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self
  *         cdef int x
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_4__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_4__str__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
@@ -4761,7 +4979,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
   PyObject *__pyx_t_11 = NULL;
   __Pyx_RefNannySetupContext("__str__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":416
+  /* "TabProxies.pyx":426
  *         cdef int x
  * 
  *         if self.is_modified:             # <<<<<<<<<<<<<<
@@ -4770,7 +4988,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
  */
   if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":417
+    /* "TabProxies.pyx":427
  * 
  *         if self.is_modified:
  *             return "\t".join(             # <<<<<<<<<<<<<<
@@ -4778,127 +4996,127 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
  *                  self.source,
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":418
+    /* "TabProxies.pyx":428
  *         if self.is_modified:
  *             return "\t".join(
  *                 (self.contig,             # <<<<<<<<<<<<<<
  *                  self.source,
  *                  self.feature,
  */
-    __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":419
+    /* "TabProxies.pyx":429
  *             return "\t".join(
  *                 (self.contig,
  *                  self.source,             # <<<<<<<<<<<<<<
  *                  self.feature,
  *                  str(self.start+1),
  */
-    __pyx_t_3 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":420
+    /* "TabProxies.pyx":430
  *                 (self.contig,
  *                  self.source,
  *                  self.feature,             # <<<<<<<<<<<<<<
  *                  str(self.start+1),
  *                  str(self.end),
  */
-    __pyx_t_4 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":421
+    /* "TabProxies.pyx":431
  *                  self.source,
  *                  self.feature,
  *                  str(self.start+1),             # <<<<<<<<<<<<<<
  *                  str(self.end),
  *                  toDot(self.score),
  */
-    __pyx_t_5 = PyInt_FromLong((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyInt_FromLong((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
     __Pyx_GIVEREF(__pyx_t_5);
     __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":422
+    /* "TabProxies.pyx":432
  *                  self.feature,
  *                  str(self.start+1),
  *                  str(self.end),             # <<<<<<<<<<<<<<
  *                  toDot(self.score),
  *                  self.strand,
  */
-    __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
     __Pyx_GIVEREF(__pyx_t_6);
     __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":423
+    /* "TabProxies.pyx":433
  *                  str(self.start+1),
  *                  str(self.end),
  *                  toDot(self.score),             # <<<<<<<<<<<<<<
  *                  self.strand,
  *                  self.frame,
  */
-    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_8 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
     PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
     __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":424
+    /* "TabProxies.pyx":434
  *                  str(self.end),
  *                  toDot(self.score),
  *                  self.strand,             # <<<<<<<<<<<<<<
  *                  self.frame,
  *                  self.attributes ) )
  */
-    __pyx_t_9 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":425
+    /* "TabProxies.pyx":435
  *                  toDot(self.score),
  *                  self.strand,
  *                  self.frame,             # <<<<<<<<<<<<<<
  *                  self.attributes ) )
  *         else:
  */
-    __pyx_t_7 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":426
+    /* "TabProxies.pyx":436
  *                  self.strand,
  *                  self.frame,
  *                  self.attributes ) )             # <<<<<<<<<<<<<<
  *         else:
  *             return TupleProxy.__str__(self)
  */
-    __pyx_t_10 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-    __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
     PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_2));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
     PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_t_3));
@@ -4926,15 +5144,15 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
     __pyx_t_9 = 0;
     __pyx_t_7 = 0;
     __pyx_t_10 = 0;
-    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
-    __Pyx_GIVEREF(__pyx_t_11);
+    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
+    PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_11));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
     __pyx_t_11 = 0;
-    __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
     __pyx_r = __pyx_t_11;
     __pyx_t_11 = 0;
     goto __pyx_L0;
@@ -4942,7 +5160,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":428
+    /* "TabProxies.pyx":438
  *                  self.attributes ) )
  *         else:
  *             return TupleProxy.__str__(self)             # <<<<<<<<<<<<<<
@@ -4950,17 +5168,17 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
  *     def invert( self, int lcontig ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_11 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
     __Pyx_INCREF(__pyx_v_self);
     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self);
     __Pyx_GIVEREF(__pyx_v_self);
-    __pyx_t_1 = PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __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_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
@@ -4989,7 +5207,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":430
+/* "TabProxies.pyx":440
  *             return TupleProxy.__str__(self)
  * 
  *     def invert( self, int lcontig ):             # <<<<<<<<<<<<<<
@@ -4997,9 +5215,9 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self)
  * 
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig); /*proto*/
-static char __pyx_doc_10TabProxies_8GTFProxy_invert[] = "invert coordinates to negative strand coordinates\n        \n        This method will only act if the feature is on the\n        negative strand.";
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig); /*proto*/
+static char __pyx_doc_10TabProxies_8GTFProxy_5invert[] = "invert coordinates to negative strand coordinates\n        \n        This method will only act if the feature is on the\n        negative strand.";
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig) {
   int __pyx_v_lcontig;
   PyObject *__pyx_v_start;
   PyObject *__pyx_v_end;
@@ -5012,7 +5230,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
   PyObject *__pyx_t_6 = NULL;
   __Pyx_RefNannySetupContext("invert");
   assert(__pyx_arg_lcontig); {
-    __pyx_v_lcontig = __Pyx_PyInt_AsInt(__pyx_arg_lcontig); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_lcontig = __Pyx_PyInt_AsInt(__pyx_arg_lcontig); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L3_error:;
@@ -5023,7 +5241,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
   __pyx_v_start = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_end = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":436
+  /* "TabProxies.pyx":446
  *         negative strand.'''
  * 
  *         if self.strand[0] == '-':             # <<<<<<<<<<<<<<
@@ -5033,7 +5251,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
   __pyx_t_1 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand[0]) == '-');
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":437
+    /* "TabProxies.pyx":447
  * 
  *         if self.strand[0] == '-':
  *             start = min(self.start, self.end)             # <<<<<<<<<<<<<<
@@ -5047,13 +5265,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
     } else {
       __pyx_t_4 = __pyx_t_3;
     }
-    __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_v_start);
     __pyx_v_start = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":438
+    /* "TabProxies.pyx":448
  *         if self.strand[0] == '-':
  *             start = min(self.start, self.end)
  *             end = max(self.start, self.end)             # <<<<<<<<<<<<<<
@@ -5067,32 +5285,32 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
     } else {
       __pyx_t_3 = __pyx_t_2;
     }
-    __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_v_end);
     __pyx_v_end = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":439
+    /* "TabProxies.pyx":449
  *             start = min(self.start, self.end)
  *             end = max(self.start, self.end)
  *             self.start, self.end = lcontig - end, lcontig - start             # <<<<<<<<<<<<<<
  * 
  *     def keys( self ):
  */
-    __pyx_t_5 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_v_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_v_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_4 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start = __pyx_t_3;
     ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end = __pyx_t_4;
@@ -5115,7 +5333,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":441
+/* "TabProxies.pyx":451
  *             self.start, self.end = lcontig - end, lcontig - start
  * 
  *     def keys( self ):             # <<<<<<<<<<<<<<
@@ -5123,9 +5341,9 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self,
  *         r = self.attributes
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_10TabProxies_8GTFProxy_keys[] = "return a list of attributes defined in this entry.";
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_10TabProxies_8GTFProxy_6keys[] = "return a list of attributes defined in this entry.";
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   char *__pyx_v_r;
   PyObject *__pyx_v_x;
   PyObject *__pyx_r = NULL;
@@ -5135,11 +5353,10 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CY
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
   int __pyx_t_6;
-  PyObject *__pyx_t_7 = NULL;
   __Pyx_RefNannySetupContext("keys");
   __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":443
+  /* "TabProxies.pyx":453
  *     def keys( self ):
  *         '''return a list of attributes defined in this entry.'''
  *         r = self.attributes             # <<<<<<<<<<<<<<
@@ -5148,93 +5365,81 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CY
  */
   __pyx_v_r = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":444
+  /* "TabProxies.pyx":454
  *         '''return a list of attributes defined in this entry.'''
  *         r = self.attributes
  *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]             # <<<<<<<<<<<<<<
  * 
- *     def __getitem__(self, item):
+ *     def __getitem__(self, key):
  */
   __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_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_3 = PyBytes_FromString(__pyx_v_r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyBytes_FromString(__pyx_v_r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_10));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
-  __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
-    __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3);
+  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
   } else {
-    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
   }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_3))) {
-      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
-      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
+    if (likely(PyList_CheckExact(__pyx_t_4))) {
+      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
+      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_4))) {
+      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
     } else {
-      __pyx_t_5 = PyIter_Next(__pyx_t_3);
-      if (!__pyx_t_5) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyIter_Next(__pyx_t_4);
+      if (!__pyx_t_3) {
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_GOTREF(__pyx_t_3);
     }
     __Pyx_DECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_5;
-    __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_2), Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_x = __pyx_t_3;
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __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 = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_2), Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_6) {
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_11));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
-      __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       goto __pyx_L7;
     }
     __pyx_L7:;
   }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __Pyx_INCREF(((PyObject *)__pyx_t_1));
   __pyx_r = ((PyObject *)__pyx_t_1);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
@@ -5247,7 +5452,6 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CY
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_AddTraceback("TabProxies.GTFProxy.keys");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -5257,41 +5461,41 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CY
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":446
+/* "TabProxies.pyx":456
  *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
  * 
- *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
- *         return self.__getattr__( item )
+ *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
+ *         return self.__getattr__( key )
  * 
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   __Pyx_RefNannySetupContext("__getitem__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":447
+  /* "TabProxies.pyx":457
  * 
- *     def __getitem__(self, item):
- *         return self.__getattr__( item )             # <<<<<<<<<<<<<<
+ *     def __getitem__(self, key):
+ *         return self.__getattr__( key )             # <<<<<<<<<<<<<<
  * 
  *     def __getattr__(self, item ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____getattr__); 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 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_v_item);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_item);
-  __Pyx_GIVEREF(__pyx_v_item);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_INCREF(__pyx_v_key);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
+  __Pyx_GIVEREF(__pyx_v_key);
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_3;
   __pyx_t_3 = 0;
   goto __pyx_L0;
@@ -5310,24 +5514,23 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getitem__(PyObject *__pyx_v_s
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":449
- *         return self.__getattr__( item )
+/* "TabProxies.pyx":459
+ *         return self.__getattr__( key )
  * 
  *     def __getattr__(self, item ):             # <<<<<<<<<<<<<<
  *         """Generic lookup of attribute from GFF/GTF attributes
  *         Only called if there *isn't* an attribute with this name
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
-static char __pyx_doc_10TabProxies_8GTFProxy___getattr__[] = "Generic lookup of attribute from GFF/GTF attributes \n        Only called if there *isn't* an attribute with this name\n        ";
-struct wrapperbase __pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__;
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_8__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
+static char __pyx_doc_10TabProxies_8GTFProxy_8__getattr__[] = "Generic lookup of attribute from GFF/GTF attributes \n        Only called if there *isn't* an attribute with this name\n        ";
+struct wrapperbase __pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__;
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_8__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
   char *__pyx_v_start;
   char *__pyx_v_query;
-  char *__pyx_v_cpy;
   char *__pyx_v_end;
   int __pyx_v_l;
-  char *__pyx_v_result;
+  PyObject *__pyx_v_result;
   PyObject *__pyx_r = NULL;
   char *__pyx_t_1;
   int __pyx_t_2;
@@ -5336,18 +5539,19 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
   int __pyx_t_5;
   int __pyx_t_6;
   __Pyx_RefNannySetupContext("__getattr__");
+  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":458
+  /* "TabProxies.pyx":468
  *         cdef char * end
  *         cdef int l
  *         query = item             # <<<<<<<<<<<<<<
  * 
  *         start = strstr( self.attributes, query)
  */
-  __pyx_t_1 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_query = __pyx_t_1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":460
+  /* "TabProxies.pyx":470
  *         query = item
  * 
  *         start = strstr( self.attributes, query)             # <<<<<<<<<<<<<<
@@ -5356,7 +5560,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
  */
   __pyx_v_start = strstr(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_query);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":461
+  /* "TabProxies.pyx":471
  * 
  *         start = strstr( self.attributes, query)
  *         if start == NULL:             # <<<<<<<<<<<<<<
@@ -5366,55 +5570,55 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
   __pyx_t_2 = (__pyx_v_start == NULL);
   if (__pyx_t_2) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":462
+    /* "TabProxies.pyx":472
  *         start = strstr( self.attributes, query)
  *         if start == NULL:
  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )             # <<<<<<<<<<<<<<
  * 
  *         start += strlen(query) + 1
  */
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), __pyx_v_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":464
+  /* "TabProxies.pyx":474
  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
  * 
  *         start += strlen(query) + 1             # <<<<<<<<<<<<<<
  *         # skip gaps before
- *         while start[0] == " ": start += 1
+ *         while start[0] == ' ': start += 1
  */
-  __pyx_v_start += (strlen(__pyx_v_query) + 1);
+  __pyx_v_start = (__pyx_v_start + (strlen(__pyx_v_query) + 1));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":466
+  /* "TabProxies.pyx":476
  *         start += strlen(query) + 1
  *         # skip gaps before
- *         while start[0] == " ": start += 1             # <<<<<<<<<<<<<<
+ *         while start[0] == ' ': start += 1             # <<<<<<<<<<<<<<
  *         if start[0] == '"':
  *             start += 1
  */
   while (1) {
     __pyx_t_2 = ((__pyx_v_start[0]) == ' ');
     if (!__pyx_t_2) break;
-    __pyx_v_start += 1;
+    __pyx_v_start = (__pyx_v_start + 1);
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":467
+  /* "TabProxies.pyx":477
  *         # skip gaps before
- *         while start[0] == " ": start += 1
+ *         while start[0] == ' ': start += 1
  *         if start[0] == '"':             # <<<<<<<<<<<<<<
  *             start += 1
  *             end = start
@@ -5422,30 +5626,30 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
   __pyx_t_2 = ((__pyx_v_start[0]) == '"');
   if (__pyx_t_2) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":468
- *         while start[0] == " ": start += 1
+    /* "TabProxies.pyx":478
+ *         while start[0] == ' ': start += 1
  *         if start[0] == '"':
  *             start += 1             # <<<<<<<<<<<<<<
  *             end = start
  *             while end[0] != '\0' and end[0] != '"': end += 1
  */
-    __pyx_v_start += 1;
+    __pyx_v_start = (__pyx_v_start + 1);
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":469
+    /* "TabProxies.pyx":479
  *         if start[0] == '"':
  *             start += 1
  *             end = start             # <<<<<<<<<<<<<<
  *             while end[0] != '\0' and end[0] != '"': end += 1
- *             l = end - start + 1
+ *             l = end - start
  */
     __pyx_v_end = __pyx_v_start;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":470
+    /* "TabProxies.pyx":480
  *             start += 1
  *             end = start
  *             while end[0] != '\0' and end[0] != '"': end += 1             # <<<<<<<<<<<<<<
- *             l = end - start + 1
- *             cpy = <char*>calloc( l, sizeof(char ) )
+ *             l = end - start
+ *             result = PyString_FromStringAndSize( start, l )
  */
     while (1) {
       __pyx_t_2 = ((__pyx_v_end[0]) != '\x00');
@@ -5456,105 +5660,47 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
         __pyx_t_6 = __pyx_t_2;
       }
       if (!__pyx_t_6) break;
-      __pyx_v_end += 1;
+      __pyx_v_end = (__pyx_v_end + 1);
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":471
+    /* "TabProxies.pyx":481
  *             end = start
  *             while end[0] != '\0' and end[0] != '"': end += 1
- *             l = end - start + 1             # <<<<<<<<<<<<<<
- *             cpy = <char*>calloc( l, sizeof(char ) )
- *             if cpy == NULL: raise ValueError("out of memory" )
- */
-    __pyx_v_l = ((__pyx_v_end - __pyx_v_start) + 1);
-
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":472
- *             while end[0] != '\0' and end[0] != '"': end += 1
- *             l = end - start + 1
- *             cpy = <char*>calloc( l, sizeof(char ) )             # <<<<<<<<<<<<<<
- *             if cpy == NULL: raise ValueError("out of memory" )
- *             memcpy( cpy, start, l )
- */
-    __pyx_v_cpy = ((char *)calloc(__pyx_v_l, (sizeof(char))));
-
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":473
- *             l = end - start + 1
- *             cpy = <char*>calloc( l, sizeof(char ) )
- *             if cpy == NULL: raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
- *             memcpy( cpy, start, l )
- *             cpy[l-1] = '\0'
- */
-    __pyx_t_6 = (__pyx_v_cpy == NULL);
-    if (__pyx_t_6) {
-      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_Raise(__pyx_t_4, 0, 0);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L11;
-    }
-    __pyx_L11:;
-
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":474
- *             cpy = <char*>calloc( l, sizeof(char ) )
- *             if cpy == NULL: raise ValueError("out of memory" )
- *             memcpy( cpy, start, l )             # <<<<<<<<<<<<<<
- *             cpy[l-1] = '\0'
- *             result = cpy
- */
-    memcpy(__pyx_v_cpy, __pyx_v_start, __pyx_v_l);
-
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":475
- *             if cpy == NULL: raise ValueError("out of memory" )
- *             memcpy( cpy, start, l )
- *             cpy[l-1] = '\0'             # <<<<<<<<<<<<<<
- *             result = cpy
- *             free(cpy)
- */
-    (__pyx_v_cpy[(__pyx_v_l - 1)]) = '\x00';
-
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":476
- *             memcpy( cpy, start, l )
- *             cpy[l-1] = '\0'
- *             result = cpy             # <<<<<<<<<<<<<<
- *             free(cpy)
+ *             l = end - start             # <<<<<<<<<<<<<<
+ *             result = PyString_FromStringAndSize( start, l )
  *             return result
  */
-    __pyx_v_result = __pyx_v_cpy;
+    __pyx_v_l = (__pyx_v_end - __pyx_v_start);
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":477
- *             cpy[l-1] = '\0'
- *             result = cpy
- *             free(cpy)             # <<<<<<<<<<<<<<
+    /* "TabProxies.pyx":482
+ *             while end[0] != '\0' and end[0] != '"': end += 1
+ *             l = end - start
+ *             result = PyString_FromStringAndSize( start, l )             # <<<<<<<<<<<<<<
  *             return result
  *         else:
  */
-    free(__pyx_v_cpy);
+    __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_start, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_v_result);
+    __pyx_v_result = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":478
- *             result = cpy
- *             free(cpy)
+    /* "TabProxies.pyx":483
+ *             l = end - start
+ *             result = PyString_FromStringAndSize( start, l )
  *             return result             # <<<<<<<<<<<<<<
  *         else:
  *             return start
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_4 = PyBytes_FromString(__pyx_v_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_r = ((PyObject *)__pyx_t_4);
-    __pyx_t_4 = 0;
+    __Pyx_INCREF(__pyx_v_result);
+    __pyx_r = __pyx_v_result;
     goto __pyx_L0;
     goto __pyx_L8;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":480
+    /* "TabProxies.pyx":485
  *             return result
  *         else:
  *             return start             # <<<<<<<<<<<<<<
@@ -5562,10 +5708,10 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
  *     def setAttribute( self, name, value ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_4 = PyBytes_FromString(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_r = ((PyObject *)__pyx_t_4);
-    __pyx_t_4 = 0;
+    __pyx_t_3 = PyBytes_FromString(__pyx_v_start); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    __pyx_r = ((PyObject *)__pyx_t_3);
+    __pyx_t_3 = 0;
     goto __pyx_L0;
   }
   __pyx_L8:;
@@ -5578,12 +5724,13 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
   __Pyx_AddTraceback("TabProxies.GTFProxy.__getattr__");
   __pyx_r = NULL;
   __pyx_L0:;
+  __Pyx_DECREF(__pyx_v_result);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":482
+/* "TabProxies.pyx":487
  *             return start
  * 
  *     def setAttribute( self, name, value ):             # <<<<<<<<<<<<<<
@@ -5591,9 +5738,9 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_s
  *         r = self.asDict()
  */
 
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_10TabProxies_8GTFProxy_setAttribute[] = "convenience method to set an attribute.";
-static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_9setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10TabProxies_8GTFProxy_9setAttribute[] = "convenience method to set an attribute.";
+static PyObject *__pyx_pf_10TabProxies_8GTFProxy_9setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_name = 0;
   PyObject *__pyx_v_value = 0;
   PyObject *__pyx_v_r;
@@ -5621,11 +5768,11 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     }
     if (unlikely(kw_args > 0)) {
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     }
     __pyx_v_name = values[0];
     __pyx_v_value = values[1];
@@ -5637,7 +5784,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("TabProxies.GTFProxy.setAttribute");
   __Pyx_RefNannyFinishContext();
@@ -5645,49 +5792,49 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_r = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":484
+  /* "TabProxies.pyx":489
  *     def setAttribute( self, name, value ):
  *         '''convenience method to set an attribute.'''
  *         r = self.asDict()             # <<<<<<<<<<<<<<
  *         r[name] = value
  *         self.fromDict( r )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__asDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__asDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_v_r);
   __pyx_v_r = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":485
+  /* "TabProxies.pyx":490
  *         '''convenience method to set an attribute.'''
  *         r = self.asDict()
  *         r[name] = value             # <<<<<<<<<<<<<<
  *         self.fromDict( r )
  * 
  */
-  if (PyObject_SetItem(__pyx_v_r, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_v_r, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":486
+  /* "TabProxies.pyx":491
  *         r = self.asDict()
  *         r[name] = value
  *         self.fromDict( r )             # <<<<<<<<<<<<<<
  * 
  * cdef class NamedTupleProxy( TupleProxy ):
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_r);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
   __Pyx_GIVEREF(__pyx_v_r);
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -5705,7 +5852,7 @@ static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":492
+/* "TabProxies.pyx":497
  *     map_key2field = {}
  * 
  *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
@@ -5729,22 +5876,22 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
   __Pyx_RefNannySetupContext("__setattr__");
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":495
+  /* "TabProxies.pyx":500
  *         '''set attribute.'''
  *         cdef int idx
  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
     PyObject* tuple = __pyx_t_2;
     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
-    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -5753,16 +5900,16 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
     __pyx_v_f = __pyx_t_3;
     __pyx_t_3 = 0;
   } else {
-    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_v_idx = __pyx_t_4;
     __Pyx_DECREF(__pyx_v_f);
@@ -5770,7 +5917,7 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
     __pyx_t_3 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":496
+  /* "TabProxies.pyx":501
  *         cdef int idx
  *         idx, f = self.map_key2field[key]
  *         if self.nfields < idx:             # <<<<<<<<<<<<<<
@@ -5780,51 +5927,51 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
   __pyx_t_6 = (((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.nfields < __pyx_v_idx);
   if (__pyx_t_6) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":497
+    /* "TabProxies.pyx":502
  *         idx, f = self.map_key2field[key]
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )             # <<<<<<<<<<<<<<
  *         TupleProxy.__setitem__(self, idx, str(value) )
  * 
  */
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_Raise(__pyx_t_2, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":498
+  /* "TabProxies.pyx":503
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )
  *         TupleProxy.__setitem__(self, idx, str(value) )             # <<<<<<<<<<<<<<
  * 
  *     def __getattr__(self, key ):
  */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_value);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_self);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
   __Pyx_GIVEREF(__pyx_v_self);
@@ -5834,10 +5981,10 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
   __Pyx_GIVEREF(__pyx_t_5);
   __pyx_t_3 = 0;
   __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
   __pyx_r = 0;
@@ -5855,7 +6002,7 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":500
+/* "TabProxies.pyx":505
  *         TupleProxy.__setitem__(self, idx, str(value) )
  * 
  *     def __getattr__(self, key ):             # <<<<<<<<<<<<<<
@@ -5863,8 +6010,8 @@ static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v
  *         idx, f = self.map_key2field[key]
  */
 
-static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
   int __pyx_v_idx;
   PyObject *__pyx_v_f;
   PyObject *__pyx_r = NULL;
@@ -5877,22 +6024,22 @@ static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *_
   __Pyx_RefNannySetupContext("__getattr__");
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":502
+  /* "TabProxies.pyx":507
  *     def __getattr__(self, key ):
  *         cdef int idx
  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
     PyObject* tuple = __pyx_t_2;
     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
-    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -5901,16 +6048,16 @@ static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *_
     __pyx_v_f = __pyx_t_3;
     __pyx_t_3 = 0;
   } else {
-    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_v_idx = __pyx_t_4;
     __Pyx_DECREF(__pyx_v_f);
@@ -5918,7 +6065,7 @@ static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *_
     __pyx_t_3 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":503
+  /* "TabProxies.pyx":508
  *         cdef int idx
  *         idx, f = self.map_key2field[key]
  *         if self.nfields < idx:             # <<<<<<<<<<<<<<
@@ -5928,31 +6075,31 @@ static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *_
   __pyx_t_6 = (((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.nfields < __pyx_v_idx);
   if (__pyx_t_6) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":504
+    /* "TabProxies.pyx":509
  *         idx, f = self.map_key2field[key]
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )             # <<<<<<<<<<<<<<
  *         return f( self.fields[idx] )
  * 
  */
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_Raise(__pyx_t_2, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":505
+  /* "TabProxies.pyx":510
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )
  *         return f( self.fields[idx] )             # <<<<<<<<<<<<<<
@@ -5960,16 +6107,16 @@ static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *_
  * cdef class BedProxy( NamedTupleProxy ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_v_f, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
@@ -5990,7 +6137,7 @@ static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":526
+/* "TabProxies.pyx":531
  *         'blockStarts': (11,str), }
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -6002,7 +6149,7 @@ static  int __pyx_f_10TabProxies_8BedProxy_getMaxFields(struct __pyx_obj_10TabPr
   int __pyx_r;
   __Pyx_RefNannySetupContext("getMaxFields");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":528
+  /* "TabProxies.pyx":533
  *     cdef int getMaxFields( self, size_t nbytes ):
  *         '''return max number of fields.'''
  *         return 12             # <<<<<<<<<<<<<<
@@ -6018,7 +6165,7 @@ static  int __pyx_f_10TabProxies_8BedProxy_getMaxFields(struct __pyx_obj_10TabPr
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":530
+/* "TabProxies.pyx":535
  *         return 12
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -6030,21 +6177,20 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
   __Pyx_RefNannySetupContext("update");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":535
+  /* "TabProxies.pyx":540
  *         nbytes does not include the terminal '\0'.
  *         '''
  *         TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
  * 
  *         if self.nfields < 3:
  */
-  __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":537
+  /* "TabProxies.pyx":542
  *         TupleProxy.update( self, buffer, nbytes )
  * 
  *         if self.nfields < 3:             # <<<<<<<<<<<<<<
@@ -6054,29 +6200,23 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
   __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.nfields < 3);
   if (__pyx_t_2) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":538
+    /* "TabProxies.pyx":543
  * 
  *         if self.nfields < 3:
  *             raise ValueError( "bed format requires at least three columns" )             # <<<<<<<<<<<<<<
  * 
  *         # determines bed format
  */
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_18));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_1, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":541
+  /* "TabProxies.pyx":546
  * 
  *         # determines bed format
  *         self.bedfields = self.nfields             # <<<<<<<<<<<<<<
@@ -6085,7 +6225,7 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
  */
   __pyx_v_self->bedfields = __pyx_v_self->__pyx_base.__pyx_base.nfields;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":544
+  /* "TabProxies.pyx":549
  * 
  *         # do automatic conversion
  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
@@ -6094,7 +6234,7 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
  */
   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":545
+  /* "TabProxies.pyx":550
  *         # do automatic conversion
  *         self.contig = self.fields[0]
  *         self.start = atoi( self.fields[1] )             # <<<<<<<<<<<<<<
@@ -6103,7 +6243,7 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
  */
   __pyx_v_self->start = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1]));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":546
+  /* "TabProxies.pyx":551
  *         self.contig = self.fields[0]
  *         self.start = atoi( self.fields[1] )
  *         self.end = atoi( self.fields[2] )             # <<<<<<<<<<<<<<
@@ -6116,7 +6256,6 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("TabProxies.BedProxy.update");
   __pyx_r = 0;
   __pyx_L0:;
@@ -6125,7 +6264,7 @@ static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabPr
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":555
+/* "TabProxies.pyx":560
  *     #    def __get__( self ): return self.end
  * 
  *     def __str__(self):             # <<<<<<<<<<<<<<
@@ -6144,7 +6283,7 @@ static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self)
   __Pyx_RefNannySetupContext("__str__");
   __pyx_v_retval = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":557
+  /* "TabProxies.pyx":562
  *     def __str__(self):
  * 
  *         cdef int save_fields = self.nfields             # <<<<<<<<<<<<<<
@@ -6153,7 +6292,7 @@ static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self)
  */
   __pyx_v_save_fields = ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":559
+  /* "TabProxies.pyx":564
  *         cdef int save_fields = self.nfields
  *         # ensure fields to use correct format
  *         self.nfields = self.bedfields             # <<<<<<<<<<<<<<
@@ -6162,29 +6301,29 @@ static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self)
  */
   ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields = ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->bedfields;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":560
+  /* "TabProxies.pyx":565
  *         # ensure fields to use correct format
  *         self.nfields = self.bedfields
  *         retval = TupleProxy.__str__( self )             # <<<<<<<<<<<<<<
  *         self.nfields = save_fields
  *         return retval
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_self);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
   __Pyx_GIVEREF(__pyx_v_self);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_retval);
   __pyx_v_retval = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":561
+  /* "TabProxies.pyx":566
  *         self.nfields = self.bedfields
  *         retval = TupleProxy.__str__( self )
  *         self.nfields = save_fields             # <<<<<<<<<<<<<<
@@ -6193,7 +6332,7 @@ static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self)
  */
   ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields = __pyx_v_save_fields;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":562
+  /* "TabProxies.pyx":567
  *         retval = TupleProxy.__str__( self )
  *         self.nfields = save_fields
  *         return retval             # <<<<<<<<<<<<<<
@@ -6220,7 +6359,7 @@ static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":564
+/* "TabProxies.pyx":569
  *         return retval
  * 
  *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
@@ -6228,10 +6367,10 @@ static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self)
  *         if key == "start": self.start = value
  */
 
-static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
-static char __pyx_doc_10TabProxies_8BedProxy___setattr__[] = "set attribute.";
-struct wrapperbase __pyx_wrapperbase_10TabProxies_8BedProxy___setattr__;
-static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8BedProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_10TabProxies_8BedProxy_1__setattr__[] = "set attribute.";
+struct wrapperbase __pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__;
+static int __pyx_pf_10TabProxies_8BedProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
   int __pyx_v_idx;
   PyObject *__pyx_v_f;
   int __pyx_r;
@@ -6245,57 +6384,57 @@ static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, P
   __Pyx_RefNannySetupContext("__setattr__");
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":566
+  /* "TabProxies.pyx":571
  *     def __setattr__(self, key, value ):
  *         '''set attribute.'''
  *         if key == "start": self.start = value             # <<<<<<<<<<<<<<
  *         elif key == "end": self.end = value
  * 
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__start), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__start), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __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 = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
-    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->start = __pyx_t_3;
     goto __pyx_L5;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":567
+  /* "TabProxies.pyx":572
  *         '''set attribute.'''
  *         if key == "start": self.start = value
  *         elif key == "end": self.end = value             # <<<<<<<<<<<<<<
  * 
  *         cdef int idx
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__end), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__end), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __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 = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
-    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->end = __pyx_t_3;
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":570
+  /* "TabProxies.pyx":575
  * 
  *         cdef int idx
  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
  *         TupleProxy._setindex(self, idx, str(value) )
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
     PyObject* tuple = __pyx_t_4;
     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
-    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -6304,16 +6443,16 @@ static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, P
     __pyx_v_f = __pyx_t_5;
     __pyx_t_5 = 0;
   } else {
-    __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     __pyx_v_idx = __pyx_t_6;
     __Pyx_DECREF(__pyx_v_f);
@@ -6321,27 +6460,27 @@ static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, P
     __pyx_t_5 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":571
+  /* "TabProxies.pyx":576
  *         cdef int idx
  *         idx, f = self.map_key2field[key]
  *         TupleProxy._setindex(self, idx, str(value) )             # <<<<<<<<<<<<<<
  * 
  * cdef class VCFProxy( NamedTupleProxy ):
  */
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_value);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_self);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
   __Pyx_GIVEREF(__pyx_v_self);
@@ -6351,10 +6490,10 @@ static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, P
   __Pyx_GIVEREF(__pyx_t_7);
   __pyx_t_5 = 0;
   __pyx_t_7 = 0;
-  __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
   __pyx_r = 0;
@@ -6372,7 +6511,7 @@ static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, P
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":589
+/* "TabProxies.pyx":594
  *         'format' : (8,str) }
  * 
  *     def __cinit__(self ):             # <<<<<<<<<<<<<<
@@ -6388,7 +6527,7 @@ static int __pyx_pf_10TabProxies_8VCFProxy___cinit__(PyObject *__pyx_v_self, PyO
     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":592
+  /* "TabProxies.pyx":597
  *         # automatically calls TupleProxy.__cinit__
  *         # start indexed access at genotypes
  *         self.offset = 9             # <<<<<<<<<<<<<<
@@ -6402,7 +6541,7 @@ static int __pyx_pf_10TabProxies_8VCFProxy___cinit__(PyObject *__pyx_v_self, PyO
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":594
+/* "TabProxies.pyx":599
  *         self.offset = 9
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -6415,18 +6554,18 @@ static  PyObject *__pyx_f_10TabProxies_8VCFProxy_update(struct __pyx_obj_10TabPr
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("update");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":599
+  /* "TabProxies.pyx":604
  *         nbytes does not include the terminal '\0'.
  *         '''
  *         TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
  * 
  *         self.contig = self.fields[0]
  */
-  __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":601
+  /* "TabProxies.pyx":606
  *         TupleProxy.update( self, buffer, nbytes )
  * 
  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
@@ -6435,7 +6574,7 @@ static  PyObject *__pyx_f_10TabProxies_8VCFProxy_update(struct __pyx_obj_10TabPr
  */
   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":603
+  /* "TabProxies.pyx":608
  *         self.contig = self.fields[0]
  *         # vcf counts from 1 - correct here
  *         self.pos = atoi( self.fields[1] ) - 1             # <<<<<<<<<<<<<<
@@ -6456,7 +6595,7 @@ static  PyObject *__pyx_f_10TabProxies_8VCFProxy_update(struct __pyx_obj_10TabPr
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":605
+/* "TabProxies.pyx":610
  *         self.pos = atoi( self.fields[1] ) - 1
  * 
  *     def __len__(self):             # <<<<<<<<<<<<<<
@@ -6464,20 +6603,20 @@ static  PyObject *__pyx_f_10TabProxies_8VCFProxy_update(struct __pyx_obj_10TabPr
  * 
  */
 
-static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy___len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy___len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy_1__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy_1__len__(PyObject *__pyx_v_self) {
   Py_ssize_t __pyx_r;
   long __pyx_t_1;
   long __pyx_t_2;
   long __pyx_t_3;
   __Pyx_RefNannySetupContext("__len__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":606
+  /* "TabProxies.pyx":611
  * 
  *     def __len__(self):
  *         return max(0, self.nfields - 9)             # <<<<<<<<<<<<<<
  * 
- *     def __setattr__(self, key, value ):
+ *     property pos:
  */
   __pyx_t_1 = (((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields - 9);
   __pyx_t_2 = 0;
@@ -6495,18 +6634,58 @@ static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy___len__(PyObject *__pyx_v_self
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":608
- *         return max(0, self.nfields - 9)
+/* "TabProxies.pyx":615
+ *     property pos:
+ *        '''feature end (in 0-based open/closed coordinates).'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            return self.pos
+ * 
+ */
+
+static PyObject *__pyx_pf_10TabProxies_8VCFProxy_3pos___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_10TabProxies_8VCFProxy_3pos___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+
+  /* "TabProxies.pyx":616
+ *        '''feature end (in 0-based open/closed coordinates).'''
+ *        def __get__( self ):
+ *            return self.pos             # <<<<<<<<<<<<<<
+ * 
+ *     def __setattr__(self, key, value ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("TabProxies.VCFProxy.pos.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "TabProxies.pyx":618
+ *            return self.pos
  * 
  *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
  *         '''set attribute.'''
  *         if key == "pos":
  */
 
-static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
-static char __pyx_doc_10TabProxies_8VCFProxy___setattr__[] = "set attribute.";
-struct wrapperbase __pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__;
-static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
+static int __pyx_pf_10TabProxies_8VCFProxy_2__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_10TabProxies_8VCFProxy_2__setattr__[] = "set attribute.";
+struct wrapperbase __pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__;
+static int __pyx_pf_10TabProxies_8VCFProxy_2__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
   int __pyx_v_idx;
   PyObject *__pyx_v_f;
   int __pyx_r;
@@ -6521,37 +6700,37 @@ static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, P
   __Pyx_INCREF(__pyx_v_value);
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":610
+  /* "TabProxies.pyx":620
  *     def __setattr__(self, key, value ):
  *         '''set attribute.'''
  *         if key == "pos":             # <<<<<<<<<<<<<<
  *             self.pos = value
  *             value += 1
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__pos), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__pos), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __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 = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":611
+    /* "TabProxies.pyx":621
  *         '''set attribute.'''
  *         if key == "pos":
  *             self.pos = value             # <<<<<<<<<<<<<<
  *             value += 1
  * 
  */
-    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     ((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->pos = __pyx_t_3;
 
-    /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":612
+    /* "TabProxies.pyx":622
  *         if key == "pos":
  *             self.pos = value
  *             value += 1             # <<<<<<<<<<<<<<
  * 
  *         cdef int idx
  */
-    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_value);
     __pyx_v_value = __pyx_t_1;
@@ -6560,22 +6739,22 @@ static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, P
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":615
+  /* "TabProxies.pyx":625
  * 
  *         cdef int idx
  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
  *         TupleProxy._setindex(self, idx, str(value) )
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
     PyObject* tuple = __pyx_t_4;
     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
-    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -6584,16 +6763,16 @@ static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, P
     __pyx_v_f = __pyx_t_5;
     __pyx_t_5 = 0;
   } else {
-    __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     __pyx_v_idx = __pyx_t_6;
     __Pyx_DECREF(__pyx_v_f);
@@ -6601,26 +6780,26 @@ static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, P
     __pyx_t_5 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":616
+  /* "TabProxies.pyx":626
  *         cdef int idx
  *         idx, f = self.map_key2field[key]
  *         TupleProxy._setindex(self, idx, str(value) )             # <<<<<<<<<<<<<<
  * 
  */
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_value);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_self);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
   __Pyx_GIVEREF(__pyx_v_self);
@@ -6630,10 +6809,10 @@ static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, P
   __Pyx_GIVEREF(__pyx_t_7);
   __pyx_t_5 = 0;
   __pyx_t_7 = 0;
-  __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
   __pyx_r = 0;
@@ -6670,7 +6849,7 @@ static void __pyx_tp_dealloc_10TabProxies_TupleProxy(PyObject *o) {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
-    __pyx_pf_10TabProxies_10TupleProxy___dealloc__(o);
+    __pyx_pf_10TabProxies_10TupleProxy_1__dealloc__(o);
     if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
@@ -6687,7 +6866,7 @@ static PyObject *__pyx_sq_item_10TabProxies_TupleProxy(PyObject *o, Py_ssize_t i
 
 static int __pyx_mp_ass_subscript_10TabProxies_TupleProxy(PyObject *o, PyObject *i, PyObject *v) {
   if (v) {
-    return __pyx_pf_10TabProxies_10TupleProxy___setitem__(o, i, v);
+    return __pyx_pf_10TabProxies_10TupleProxy_5__setitem__(o, i, v);
   }
   else {
     PyErr_Format(PyExc_NotImplementedError,
@@ -6697,8 +6876,9 @@ static int __pyx_mp_ass_subscript_10TabProxies_TupleProxy(PyObject *o, PyObject
 }
 
 static PyMethodDef __pyx_methods_10TabProxies_TupleProxy[] = {
-  {__Pyx_NAMESTR("_setindex"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy__setindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy__setindex)},
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy___next__)},
+  {__Pyx_NAMESTR("_getindex"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy_2_getindex, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy_2_getindex)},
+  {__Pyx_NAMESTR("_setindex"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy_4_setindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy_4_setindex)},
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy_8__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy_8__next__)},
   {0, 0, 0, 0}
 };
 
@@ -6761,7 +6941,7 @@ static PyNumberMethods __pyx_tp_as_number_TupleProxy = {
 };
 
 static PySequenceMethods __pyx_tp_as_sequence_TupleProxy = {
-  __pyx_pf_10TabProxies_10TupleProxy___len__, /*sq_length*/
+  __pyx_pf_10TabProxies_10TupleProxy_6__len__, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
   __pyx_sq_item_10TabProxies_TupleProxy, /*sq_item*/
@@ -6774,8 +6954,8 @@ static PySequenceMethods __pyx_tp_as_sequence_TupleProxy = {
 };
 
 static PyMappingMethods __pyx_tp_as_mapping_TupleProxy = {
-  __pyx_pf_10TabProxies_10TupleProxy___len__, /*mp_length*/
-  __pyx_pf_10TabProxies_10TupleProxy___getitem__, /*mp_subscript*/
+  __pyx_pf_10TabProxies_10TupleProxy_6__len__, /*mp_length*/
+  __pyx_pf_10TabProxies_10TupleProxy_3__getitem__, /*mp_subscript*/
   __pyx_mp_ass_subscript_10TabProxies_TupleProxy, /*mp_ass_subscript*/
 };
 
@@ -6800,7 +6980,7 @@ static PyBufferProcs __pyx_tp_as_buffer_TupleProxy = {
   #endif
 };
 
-PyTypeObject __pyx_type_10TabProxies_TupleProxy = {
+static PyTypeObject __pyx_type_10TabProxies_TupleProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("TabProxies.TupleProxy"), /*tp_name*/
   sizeof(struct __pyx_obj_10TabProxies_TupleProxy), /*tp_basicsize*/
@@ -6820,18 +7000,18 @@ PyTypeObject __pyx_type_10TabProxies_TupleProxy = {
   &__pyx_tp_as_mapping_TupleProxy, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
-  __pyx_pf_10TabProxies_10TupleProxy___str__, /*tp_str*/
+  __pyx_pf_10TabProxies_10TupleProxy_9__str__, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_TupleProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   __Pyx_DOCSTR("Proxy class for access to parsed row as a tuple.\n\n    This class represents a table row for fast read-access.\n\n    Access to individual fields is via the [] operator.\n    \n    Only read-only access is implemented.\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
-  __pyx_pf_10TabProxies_10TupleProxy___iter__, /*tp_iter*/
-  __pyx_pf_10TabProxies_10TupleProxy___next__, /*tp_iternext*/
+  __pyx_pf_10TabProxies_10TupleProxy_7__iter__, /*tp_iter*/
+  __pyx_pf_10TabProxies_10TupleProxy_8__next__, /*tp_iternext*/
   __pyx_methods_10TabProxies_TupleProxy, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
@@ -6874,7 +7054,7 @@ static void __pyx_tp_dealloc_10TabProxies_GTFProxy(PyObject *o) {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
-    __pyx_pf_10TabProxies_8GTFProxy___dealloc__(o);
+    __pyx_pf_10TabProxies_8GTFProxy_1__dealloc__(o);
     if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
@@ -6893,7 +7073,7 @@ static PyObject *__pyx_tp_getattro_10TabProxies_GTFProxy(PyObject *o, PyObject *
   PyObject *v = PyObject_GenericGetAttr(o, n);
   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
     PyErr_Clear();
-    v = __pyx_pf_10TabProxies_8GTFProxy___getattr__(o, n);
+    v = __pyx_pf_10TabProxies_8GTFProxy_8__getattr__(o, n);
   }
   return v;
 }
@@ -6904,7 +7084,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_contig(PyObject *o, void *
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_contig(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_6contig_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -6918,7 +7098,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_feature(PyObject *o, void
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_feature(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_7feature_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -6932,7 +7112,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_source(PyObject *o, void *
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_source(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_6source___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_6source_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -6946,7 +7126,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_start(PyObject *o, void *x
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_start(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_5start___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_5start_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -6960,7 +7140,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_end(PyObject *o, void *x)
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_end(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_3end___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_3end_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -6974,7 +7154,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_score(PyObject *o, void *x
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_score(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_5score___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_5score_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -6988,7 +7168,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_strand(PyObject *o, void *
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_strand(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_6strand_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -7002,7 +7182,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_frame(PyObject *o, void *x
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_frame(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_5frame_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -7016,7 +7196,7 @@ static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_attributes(PyObject *o, vo
 
 static int __pyx_setprop_10TabProxies_8GTFProxy_attributes(PyObject *o, PyObject *v, void *x) {
   if (v) {
-    return __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(o, v);
+    return __pyx_pf_10TabProxies_8GTFProxy_10attributes_1__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -7025,25 +7205,25 @@ static int __pyx_setprop_10TabProxies_8GTFProxy_attributes(PyObject *o, PyObject
 }
 
 static PyMethodDef __pyx_methods_10TabProxies_GTFProxy[] = {
-  {__Pyx_NAMESTR("asDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_asDict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_asDict)},
-  {__Pyx_NAMESTR("fromDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_fromDict, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_fromDict)},
-  {__Pyx_NAMESTR("invert"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_invert, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_invert)},
-  {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_keys)},
-  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy___getattr__)},
-  {__Pyx_NAMESTR("setAttribute"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_setAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_setAttribute)},
+  {__Pyx_NAMESTR("asDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_2asDict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_2asDict)},
+  {__Pyx_NAMESTR("fromDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_3fromDict, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_3fromDict)},
+  {__Pyx_NAMESTR("invert"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_5invert, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_5invert)},
+  {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_6keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_6keys)},
+  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_8__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_8__getattr__)},
+  {__Pyx_NAMESTR("setAttribute"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_9setAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_9setAttribute)},
   {0, 0, 0, 0}
 };
 
 static struct PyGetSetDef __pyx_getsets_10TabProxies_GTFProxy[] = {
-  {(char *)"contig", __pyx_getprop_10TabProxies_8GTFProxy_contig, __pyx_setprop_10TabProxies_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_19), 0},
-  {(char *)"feature", __pyx_getprop_10TabProxies_8GTFProxy_feature, __pyx_setprop_10TabProxies_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_20), 0},
-  {(char *)"source", __pyx_getprop_10TabProxies_8GTFProxy_source, __pyx_setprop_10TabProxies_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_21), 0},
-  {(char *)"start", __pyx_getprop_10TabProxies_8GTFProxy_start, __pyx_setprop_10TabProxies_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_22), 0},
-  {(char *)"end", __pyx_getprop_10TabProxies_8GTFProxy_end, __pyx_setprop_10TabProxies_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_23), 0},
-  {(char *)"score", __pyx_getprop_10TabProxies_8GTFProxy_score, __pyx_setprop_10TabProxies_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_24), 0},
-  {(char *)"strand", __pyx_getprop_10TabProxies_8GTFProxy_strand, __pyx_setprop_10TabProxies_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_25), 0},
-  {(char *)"frame", __pyx_getprop_10TabProxies_8GTFProxy_frame, __pyx_setprop_10TabProxies_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_26), 0},
-  {(char *)"attributes", __pyx_getprop_10TabProxies_8GTFProxy_attributes, __pyx_setprop_10TabProxies_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_27), 0},
+  {(char *)"contig", __pyx_getprop_10TabProxies_8GTFProxy_contig, __pyx_setprop_10TabProxies_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_33), 0},
+  {(char *)"feature", __pyx_getprop_10TabProxies_8GTFProxy_feature, __pyx_setprop_10TabProxies_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_34), 0},
+  {(char *)"source", __pyx_getprop_10TabProxies_8GTFProxy_source, __pyx_setprop_10TabProxies_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_35), 0},
+  {(char *)"start", __pyx_getprop_10TabProxies_8GTFProxy_start, __pyx_setprop_10TabProxies_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_36), 0},
+  {(char *)"end", __pyx_getprop_10TabProxies_8GTFProxy_end, __pyx_setprop_10TabProxies_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_37), 0},
+  {(char *)"score", __pyx_getprop_10TabProxies_8GTFProxy_score, __pyx_setprop_10TabProxies_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_38), 0},
+  {(char *)"strand", __pyx_getprop_10TabProxies_8GTFProxy_strand, __pyx_setprop_10TabProxies_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_39), 0},
+  {(char *)"frame", __pyx_getprop_10TabProxies_8GTFProxy_frame, __pyx_setprop_10TabProxies_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_40), 0},
+  {(char *)"attributes", __pyx_getprop_10TabProxies_8GTFProxy_attributes, __pyx_setprop_10TabProxies_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_41), 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -7120,7 +7300,7 @@ static PySequenceMethods __pyx_tp_as_sequence_GTFProxy = {
 
 static PyMappingMethods __pyx_tp_as_mapping_GTFProxy = {
   0, /*mp_length*/
-  __pyx_pf_10TabProxies_8GTFProxy___getitem__, /*mp_subscript*/
+  __pyx_pf_10TabProxies_8GTFProxy_7__getitem__, /*mp_subscript*/
   0, /*mp_ass_subscript*/
 };
 
@@ -7145,7 +7325,7 @@ static PyBufferProcs __pyx_tp_as_buffer_GTFProxy = {
   #endif
 };
 
-PyTypeObject __pyx_type_10TabProxies_GTFProxy = {
+static PyTypeObject __pyx_type_10TabProxies_GTFProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("TabProxies.GTFProxy"), /*tp_name*/
   sizeof(struct __pyx_obj_10TabProxies_GTFProxy), /*tp_basicsize*/
@@ -7165,11 +7345,11 @@ PyTypeObject __pyx_type_10TabProxies_GTFProxy = {
   &__pyx_tp_as_mapping_GTFProxy, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
-  __pyx_pf_10TabProxies_8GTFProxy___str__, /*tp_str*/
+  __pyx_pf_10TabProxies_8GTFProxy_4__str__, /*tp_str*/
   __pyx_tp_getattro_10TabProxies_GTFProxy, /*tp_getattro*/
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_GTFProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   __Pyx_DOCSTR("Proxy class for access to GTF fields.\n\n    This class represents a GTF entry for fast read-access.\n    Write-access has been added as well, though some care must\n    be taken. If any of the string fields (contig, source, ...)\n    are set, the new value is tied to the lifetime of the\n    argument that was supplied.\n\n    The only exception is the attributes field when set from\n    a dictionary - this field will manage its own memory.\n\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -7215,7 +7395,7 @@ static PyObject *__pyx_tp_getattro_10TabProxies_NamedTupleProxy(PyObject *o, PyO
   PyObject *v = PyObject_GenericGetAttr(o, n);
   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
     PyErr_Clear();
-    v = __pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(o, n);
+    v = __pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__(o, n);
   }
   return v;
 }
@@ -7232,7 +7412,7 @@ static int __pyx_tp_setattro_10TabProxies_NamedTupleProxy(PyObject *o, PyObject
 }
 
 static PyMethodDef __pyx_methods_10TabProxies_NamedTupleProxy[] = {
-  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
+  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
   {0, 0, 0, 0}
 };
 
@@ -7334,7 +7514,7 @@ static PyBufferProcs __pyx_tp_as_buffer_NamedTupleProxy = {
   #endif
 };
 
-PyTypeObject __pyx_type_10TabProxies_NamedTupleProxy = {
+static PyTypeObject __pyx_type_10TabProxies_NamedTupleProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("TabProxies.NamedTupleProxy"), /*tp_name*/
   sizeof(struct __pyx_obj_10TabProxies_NamedTupleProxy), /*tp_basicsize*/
@@ -7358,7 +7538,7 @@ PyTypeObject __pyx_type_10TabProxies_NamedTupleProxy = {
   __pyx_tp_getattro_10TabProxies_NamedTupleProxy, /*tp_getattro*/
   __pyx_tp_setattro_10TabProxies_NamedTupleProxy, /*tp_setattro*/
   &__pyx_tp_as_buffer_NamedTupleProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   0, /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -7402,7 +7582,7 @@ static PyObject *__pyx_tp_new_10TabProxies_BedProxy(PyTypeObject *t, PyObject *a
 
 static int __pyx_tp_setattro_10TabProxies_BedProxy(PyObject *o, PyObject *n, PyObject *v) {
   if (v) {
-    return __pyx_pf_10TabProxies_8BedProxy___setattr__(o, n, v);
+    return __pyx_pf_10TabProxies_8BedProxy_1__setattr__(o, n, v);
   }
   else {
     if (__pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro)
@@ -7513,7 +7693,7 @@ static PyBufferProcs __pyx_tp_as_buffer_BedProxy = {
   #endif
 };
 
-PyTypeObject __pyx_type_10TabProxies_BedProxy = {
+static PyTypeObject __pyx_type_10TabProxies_BedProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("TabProxies.BedProxy"), /*tp_name*/
   sizeof(struct __pyx_obj_10TabProxies_BedProxy), /*tp_basicsize*/
@@ -7537,7 +7717,7 @@ PyTypeObject __pyx_type_10TabProxies_BedProxy = {
   0, /*tp_getattro*/
   __pyx_tp_setattro_10TabProxies_BedProxy, /*tp_setattro*/
   &__pyx_tp_as_buffer_BedProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   __Pyx_DOCSTR("Proxy class for access to Bed fields.\n\n    This class represents a GTF entry for fast read-access.\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -7584,7 +7764,7 @@ static PyObject *__pyx_tp_new_10TabProxies_VCFProxy(PyTypeObject *t, PyObject *a
 
 static int __pyx_tp_setattro_10TabProxies_VCFProxy(PyObject *o, PyObject *n, PyObject *v) {
   if (v) {
-    return __pyx_pf_10TabProxies_8VCFProxy___setattr__(o, n, v);
+    return __pyx_pf_10TabProxies_8VCFProxy_2__setattr__(o, n, v);
   }
   else {
     if (__pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro)
@@ -7593,10 +7773,19 @@ static int __pyx_tp_setattro_10TabProxies_VCFProxy(PyObject *o, PyObject *n, PyO
   }
 }
 
+static PyObject *__pyx_getprop_10TabProxies_8VCFProxy_pos(PyObject *o, void *x) {
+  return __pyx_pf_10TabProxies_8VCFProxy_3pos___get__(o);
+}
+
 static PyMethodDef __pyx_methods_10TabProxies_VCFProxy[] = {
   {0, 0, 0, 0}
 };
 
+static struct PyGetSetDef __pyx_getsets_10TabProxies_VCFProxy[] = {
+  {(char *)"pos", __pyx_getprop_10TabProxies_8VCFProxy_pos, 0, __Pyx_DOCSTR(__pyx_k_37), 0},
+  {0, 0, 0, 0, 0}
+};
+
 static PyNumberMethods __pyx_tp_as_number_VCFProxy = {
   0, /*nb_add*/
   0, /*nb_subtract*/
@@ -7656,7 +7845,7 @@ static PyNumberMethods __pyx_tp_as_number_VCFProxy = {
 };
 
 static PySequenceMethods __pyx_tp_as_sequence_VCFProxy = {
-  __pyx_pf_10TabProxies_8VCFProxy___len__, /*sq_length*/
+  __pyx_pf_10TabProxies_8VCFProxy_1__len__, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
   0, /*sq_item*/
@@ -7669,7 +7858,7 @@ static PySequenceMethods __pyx_tp_as_sequence_VCFProxy = {
 };
 
 static PyMappingMethods __pyx_tp_as_mapping_VCFProxy = {
-  __pyx_pf_10TabProxies_8VCFProxy___len__, /*mp_length*/
+  __pyx_pf_10TabProxies_8VCFProxy_1__len__, /*mp_length*/
   0, /*mp_subscript*/
   0, /*mp_ass_subscript*/
 };
@@ -7695,7 +7884,7 @@ static PyBufferProcs __pyx_tp_as_buffer_VCFProxy = {
   #endif
 };
 
-PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
+static PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("TabProxies.VCFProxy"), /*tp_name*/
   sizeof(struct __pyx_obj_10TabProxies_VCFProxy), /*tp_basicsize*/
@@ -7719,7 +7908,7 @@ PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
   0, /*tp_getattro*/
   __pyx_tp_setattro_10TabProxies_VCFProxy, /*tp_setattro*/
   &__pyx_tp_as_buffer_VCFProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   __Pyx_DOCSTR("Proxy class for access to VCF fields.\n\n    The genotypes are accessed via index.\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -7729,7 +7918,7 @@ PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
   0, /*tp_iternext*/
   __pyx_methods_10TabProxies_VCFProxy, /*tp_methods*/
   0, /*tp_members*/
-  0, /*tp_getset*/
+  __pyx_getsets_10TabProxies_VCFProxy, /*tp_getset*/
   0, /*tp_base*/
   0, /*tp_dict*/
   0, /*tp_descr_get*/
@@ -7752,8 +7941,6 @@ PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
 };
 
 static PyMethodDef __pyx_methods[] = {
-  {__Pyx_NAMESTR("toDot"), (PyCFunction)__pyx_pf_10TabProxies_toDot, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_toDot)},
-  {__Pyx_NAMESTR("quote"), (PyCFunction)__pyx_pf_10TabProxies_quote, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_quote)},
   {0, 0, 0, 0}
 };
 
@@ -7774,59 +7961,41 @@ static struct PyModuleDef __pyx_moduledef = {
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
   {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
-  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
-  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
-  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
   {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
-  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
   {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
   {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
   {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
   {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
-  {&__pyx_kp_u_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 1, 0, 0},
-  {&__pyx_kp_u_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 1, 0, 0},
+  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
+  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 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_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
   {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
-  {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 1, 0, 0},
-  {&__pyx_kp_u_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 1, 0, 0},
-  {&__pyx_kp_u_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 1, 0, 0},
-  {&__pyx_kp_u_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 1, 0, 0},
-  {&__pyx_kp_u_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 1, 0, 0},
-  {&__pyx_kp_u_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 1, 0, 0},
-  {&__pyx_kp_u_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 1, 0, 0},
-  {&__pyx_kp_u_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 0, 0},
-  {&__pyx_kp_u_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 1, 0, 0},
-  {&__pyx_kp_u_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 1, 0, 0},
-  {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
-  {&__pyx_kp_u_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 1, 0, 0},
-  {&__pyx_kp_u_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 1, 0, 0},
-  {&__pyx_kp_u_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 1, 0, 0},
+  {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
+  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
   {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
-  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
   {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
   {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
-  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
   {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
-  {&__pyx_n_s__BedProxy, __pyx_k__BedProxy, sizeof(__pyx_k__BedProxy), 0, 0, 1, 1},
-  {&__pyx_n_s__GTFProxy, __pyx_k__GTFProxy, sizeof(__pyx_k__GTFProxy), 0, 0, 1, 1},
   {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
   {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
-  {&__pyx_n_s__NamedTupleProxy, __pyx_k__NamedTupleProxy, sizeof(__pyx_k__NamedTupleProxy), 0, 0, 1, 1},
   {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
   {&__pyx_n_s__StringType, __pyx_k__StringType, sizeof(__pyx_k__StringType), 0, 0, 1, 1},
   {&__pyx_n_s__StringTypes, __pyx_k__StringTypes, sizeof(__pyx_k__StringTypes), 0, 0, 1, 1},
-  {&__pyx_n_s__TupleProxy, __pyx_k__TupleProxy, sizeof(__pyx_k__TupleProxy), 0, 0, 1, 1},
+  {&__pyx_n_s__TabProxies, __pyx_k__TabProxies, sizeof(__pyx_k__TabProxies), 0, 0, 1, 1},
   {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
-  {&__pyx_n_s__VCFProxy, __pyx_k__VCFProxy, sizeof(__pyx_k__VCFProxy), 0, 0, 1, 1},
   {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
   {&__pyx_n_s____getattr__, __pyx_k____getattr__, sizeof(__pyx_k____getattr__), 0, 0, 1, 1},
   {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
-  {&__pyx_n_s____next__, __pyx_k____next__, sizeof(__pyx_k____next__), 0, 0, 1, 1},
-  {&__pyx_n_s____setattr__, __pyx_k____setattr__, sizeof(__pyx_k____setattr__), 0, 0, 1, 1},
   {&__pyx_n_s____setitem__, __pyx_k____setitem__, sizeof(__pyx_k____setitem__), 0, 0, 1, 1},
   {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1},
   {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
+  {&__pyx_n_s___getindex, __pyx_k___getindex, sizeof(__pyx_k___getindex), 0, 0, 1, 1},
   {&__pyx_n_s___setindex, __pyx_k___setindex, sizeof(__pyx_k___setindex), 0, 0, 1, 1},
   {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1},
+  {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1},
   {&__pyx_n_s__asDict, __pyx_k__asDict, sizeof(__pyx_k__asDict), 0, 0, 1, 1},
   {&__pyx_n_s__attributes, __pyx_k__attributes, sizeof(__pyx_k__attributes), 0, 0, 1, 1},
   {&__pyx_n_s__bedfields, __pyx_k__bedfields, sizeof(__pyx_k__bedfields), 0, 0, 1, 1},
@@ -7846,13 +8015,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__hasOwnAttributes, __pyx_k__hasOwnAttributes, sizeof(__pyx_k__hasOwnAttributes), 0, 0, 1, 1},
   {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
   {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
+  {&__pyx_n_s__indices, __pyx_k__indices, sizeof(__pyx_k__indices), 0, 0, 1, 1},
   {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
-  {&__pyx_n_s__invert, __pyx_k__invert, sizeof(__pyx_k__invert), 0, 0, 1, 1},
   {&__pyx_n_s__is_modified, __pyx_k__is_modified, sizeof(__pyx_k__is_modified), 0, 0, 1, 1},
   {&__pyx_n_s__itemRGB, __pyx_k__itemRGB, sizeof(__pyx_k__itemRGB), 0, 0, 1, 1},
   {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
   {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
-  {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
   {&__pyx_n_s__map_key2field, __pyx_k__map_key2field, sizeof(__pyx_k__map_key2field), 0, 0, 1, 1},
   {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
   {&__pyx_n_s__nbytes, __pyx_k__nbytes, sizeof(__pyx_k__nbytes), 0, 0, 1, 1},
@@ -7864,7 +8032,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
   {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
   {&__pyx_n_s__score, __pyx_k__score, sizeof(__pyx_k__score), 0, 0, 1, 1},
-  {&__pyx_n_s__setAttribute, __pyx_k__setAttribute, sizeof(__pyx_k__setAttribute), 0, 0, 1, 1},
   {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 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},
@@ -7882,41 +8049,225 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
 static int __Pyx_InitCachedBuiltins(void) {
   __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #if PY_MAJOR_VERSION >= 3
-  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #else
-  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #endif
-  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
 }
 
-static int __Pyx_InitGlobals(void) {
-  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __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_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  return 0;
-  __pyx_L1_error:;
-  return -1;
-}
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
 
-#if PY_MAJOR_VERSION < 3
-PyMODINIT_FUNC initTabProxies(void); /*proto*/
+  /* "TabProxies.pyx":77
+ *         self.data = <char*>malloc( s )
+ *         if self.data == NULL:
+ *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
+ *         self.nbytes = nbytes
+ *         memcpy( <char*>self.data, buffer, s )
+ */
+  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
+
+  /* "TabProxies.pyx":119
+ *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
+ *         if self.fields == NULL:
+ *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
+ * 
+ *         #################################
+ */
+  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_6));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));
+
+  /* "TabProxies.pyx":148
+ *         cdef int i = index
+ *         if i < 0: i += self.nfields
+ *         if i < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
+ *         i += self.offset
+ *         if i >= self.nfields:
+ */
+  __pyx_k_tuple_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_9));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
+  PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_s_8));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));
+
+  /* "TabProxies.pyx":166
+ *         '''set item at idx index.'''
+ *         cdef int idx = index
+ *         if idx < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
+ *         if idx >= self.nfields:
+ *             raise IndexError( "list index out of range" )
+ */
+  __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_11));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
+  PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_s_8));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
+
+  /* "TabProxies.pyx":168
+ *         if idx < 0: raise IndexError( "list index out of range" )
+ *         if idx >= self.nfields:
+ *             raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
+ * 
+ *         if isNew( self.fields[idx], self.data, self.nbytes ):
+ */
+  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_12));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
+  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_8));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
+
+  /* "TabProxies.pyx":183
+ *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
+ *         if self.fields[idx] == NULL:
+ *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
+ *         strcpy( self.fields[idx], tmp )
+ * 
+ */
+  __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_13));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+  PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
+
+  /* "TabProxies.pyx":220
+ *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
+ *             if cpy == NULL:
+ *                 raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
+ *             memcpy( cpy, self.data, self.nbytes+1)
+ *             for x from 0 <= x < self.nbytes:
+ */
+  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_15));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
+
+  /* "TabProxies.pyx":368
+ * 
+ *         # separate into fields
+ *         fields = [ x.strip() for x in attributes.split(";")[:-1]]             # <<<<<<<<<<<<<<
+ * 
+ *         result = {}
+ */
+  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
+  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
+
+  /* "TabProxies.pyx":374
+ *         for f in fields:
+ * 
+ *             d = [ x.strip() for x in f.split(" ")]             # <<<<<<<<<<<<<<
+ * 
+ *             n,v = d[0], d[1]
+ */
+  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_21));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
+  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
+
+  /* "TabProxies.pyx":416
+ *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
+ *         if self.attributes == NULL:
+ *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
+ *         memcpy( self.attributes, p, l )
+ * 
+ */
+  __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_26));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+  PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
+
+  /* "TabProxies.pyx":454
+ *         '''return a list of attributes defined in this entry.'''
+ *         r = self.attributes
+ *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]             # <<<<<<<<<<<<<<
+ * 
+ *     def __getitem__(self, key):
+ */
+  __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_27));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
+  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_18));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
+  __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_28));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
+  PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_20));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
+
+  /* "TabProxies.pyx":543
+ * 
+ *         if self.nfields < 3:
+ *             raise ValueError( "bed format requires at least three columns" )             # <<<<<<<<<<<<<<
+ * 
+ *         # determines bed format
+ */
+  __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
+  PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_31));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
+  __Pyx_RefNannyFinishContext();
+  return 0;
+  __pyx_L1_error:;
+  __Pyx_RefNannyFinishContext();
+  return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __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_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initTabProxies(void); /*proto*/
 PyMODINIT_FUNC initTabProxies(void)
 #else
 PyMODINIT_FUNC PyInit_TabProxies(void); /*proto*/
@@ -7925,7 +8276,6 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
 {
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
   #if CYTHON_REFNANNY
   void* __pyx_refnanny = NULL;
   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -7969,46 +8319,40 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   }
   /*--- 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 ---*/
   /*--- Function export code ---*/
   /*--- Type init code ---*/
   __pyx_vtabptr_10TabProxies_TupleProxy = &__pyx_vtable_10TabProxies_TupleProxy;
-  #if PY_MAJOR_VERSION >= 3
   __pyx_vtable_10TabProxies_TupleProxy.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_10TupleProxy_getMaxFields;
   __pyx_vtable_10TabProxies_TupleProxy.take = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_take;
   __pyx_vtable_10TabProxies_TupleProxy.present = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_present;
   __pyx_vtable_10TabProxies_TupleProxy.copy = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_copy;
   __pyx_vtable_10TabProxies_TupleProxy.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_update;
-  #else
-  *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.getMaxFields = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_getMaxFields;
-  *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.take = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_take;
-  *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.present = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_present;
-  *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.copy = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_copy;
-  *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.update = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_update;
-  #endif
   if (PyType_Ready(&__pyx_type_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   {
     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__.doc = __pyx_doc_10TabProxies_10TupleProxy___setitem__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__;
+      __pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__.doc = __pyx_doc_10TabProxies_10TupleProxy_5__setitem__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__;
     }
   }
   {
     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_10TabProxies_10TupleProxy___next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_10TabProxies_10TupleProxy___next__.doc = __pyx_doc_10TabProxies_10TupleProxy___next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy___next__;
+      __pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__.doc = __pyx_doc_10TabProxies_10TupleProxy_8__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__;
     }
   }
   {
     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_10TabProxies_10TupleProxy___str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_10TabProxies_10TupleProxy___str__.doc = __pyx_doc_10TabProxies_10TupleProxy___str__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy___str__;
+      __pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__.doc = __pyx_doc_10TabProxies_10TupleProxy_9__str__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__;
     }
   }
   if (__Pyx_SetVtable(__pyx_type_10TabProxies_TupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -8016,89 +8360,76 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __pyx_ptype_10TabProxies_TupleProxy = &__pyx_type_10TabProxies_TupleProxy;
   __pyx_vtabptr_10TabProxies_GTFProxy = &__pyx_vtable_10TabProxies_GTFProxy;
   __pyx_vtable_10TabProxies_GTFProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
-  #if PY_MAJOR_VERSION >= 3
   __pyx_vtable_10TabProxies_GTFProxy.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_8GTFProxy_getMaxFields;
   __pyx_vtable_10TabProxies_GTFProxy.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8GTFProxy_update;
-  #else
-  *(void(**)(void))&__pyx_vtable_10TabProxies_GTFProxy.__pyx_base.getMaxFields = (void(*)(void))__pyx_f_10TabProxies_8GTFProxy_getMaxFields;
-  *(void(**)(void))&__pyx_vtable_10TabProxies_GTFProxy.__pyx_base.update = (void(*)(void))__pyx_f_10TabProxies_8GTFProxy_update;
-  #endif
   __pyx_type_10TabProxies_GTFProxy.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
-  if (PyType_Ready(&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__.doc = __pyx_doc_10TabProxies_8GTFProxy___getattr__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__;
+      __pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__.doc = __pyx_doc_10TabProxies_8GTFProxy_8__getattr__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__;
     }
   }
-  if (__Pyx_SetVtable(__pyx_type_10TabProxies_GTFProxy.tp_dict, __pyx_vtabptr_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_10TabProxies_GTFProxy.tp_dict, __pyx_vtabptr_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_10TabProxies_GTFProxy = &__pyx_type_10TabProxies_GTFProxy;
   __pyx_vtabptr_10TabProxies_NamedTupleProxy = &__pyx_vtable_10TabProxies_NamedTupleProxy;
   __pyx_vtable_10TabProxies_NamedTupleProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
   __pyx_type_10TabProxies_NamedTupleProxy.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
-  if (PyType_Ready(&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__.doc = __pyx_doc_10TabProxies_15NamedTupleProxy___setattr__;
       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__;
     }
   }
-  if (__Pyx_SetVtable(__pyx_type_10TabProxies_NamedTupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "NamedTupleProxy", (PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_10TabProxies_NamedTupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "NamedTupleProxy", (PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_10TabProxies_NamedTupleProxy = &__pyx_type_10TabProxies_NamedTupleProxy;
   __pyx_vtabptr_10TabProxies_BedProxy = &__pyx_vtable_10TabProxies_BedProxy;
   __pyx_vtable_10TabProxies_BedProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
-  #if PY_MAJOR_VERSION >= 3
   __pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_8BedProxy_getMaxFields;
   __pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8BedProxy_update;
-  #else
-  *(void(**)(void))&__pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (void(*)(void))__pyx_f_10TabProxies_8BedProxy_getMaxFields;
-  *(void(**)(void))&__pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.update = (void(*)(void))__pyx_f_10TabProxies_8BedProxy_update;
-  #endif
   __pyx_type_10TabProxies_BedProxy.tp_base = __pyx_ptype_10TabProxies_NamedTupleProxy;
-  if (PyType_Ready(&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_10TabProxies_8BedProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_10TabProxies_8BedProxy___setattr__.doc = __pyx_doc_10TabProxies_8BedProxy___setattr__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8BedProxy___setattr__;
+      __pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__.doc = __pyx_doc_10TabProxies_8BedProxy_1__setattr__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__;
     }
   }
-  if (__Pyx_SetVtable(__pyx_type_10TabProxies_BedProxy.tp_dict, __pyx_vtabptr_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "BedProxy", (PyObject *)&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_10TabProxies_BedProxy.tp_dict, __pyx_vtabptr_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "BedProxy", (PyObject *)&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_10TabProxies_BedProxy = &__pyx_type_10TabProxies_BedProxy;
   __pyx_vtabptr_10TabProxies_VCFProxy = &__pyx_vtable_10TabProxies_VCFProxy;
   __pyx_vtable_10TabProxies_VCFProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
-  #if PY_MAJOR_VERSION >= 3
   __pyx_vtable_10TabProxies_VCFProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8VCFProxy_update;
-  #else
-  *(void(**)(void))&__pyx_vtable_10TabProxies_VCFProxy.__pyx_base.__pyx_base.update = (void(*)(void))__pyx_f_10TabProxies_8VCFProxy_update;
-  #endif
   __pyx_type_10TabProxies_VCFProxy.tp_base = __pyx_ptype_10TabProxies_NamedTupleProxy;
-  if (PyType_Ready(&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__.doc = __pyx_doc_10TabProxies_8VCFProxy___setattr__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__;
+      __pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__.doc = __pyx_doc_10TabProxies_8VCFProxy_2__setattr__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__;
     }
   }
-  if (__Pyx_SetVtable(__pyx_type_10TabProxies_VCFProxy.tp_dict, __pyx_vtabptr_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "VCFProxy", (PyObject *)&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_10TabProxies_VCFProxy.tp_dict, __pyx_vtabptr_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "VCFProxy", (PyObject *)&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_10TabProxies_VCFProxy = &__pyx_type_10TabProxies_VCFProxy;
   /*--- Type import code ---*/
   __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Function import code ---*/
   /*--- Execution code ---*/
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":1
+  /* "TabProxies.pyx":1
  * import types             # <<<<<<<<<<<<<<
  * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
  * 
@@ -8108,578 +8439,458 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":490
+  /* "TabProxies.pyx":228
+ *             return result
+ * 
+ * def toDot( v ):             # <<<<<<<<<<<<<<
+ *     '''convert value to '.' if None'''
+ *     if v == None: return "."
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10TabProxies_toDot, NULL, __pyx_n_s__TabProxies); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__toDot, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "TabProxies.pyx":233
+ *     else: return str(v)
+ * 
+ * def quote( v ):             # <<<<<<<<<<<<<<
+ *     '''return a quoted attribute.'''
+ *     if type(v) in types.StringTypes:
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10TabProxies_1quote, NULL, __pyx_n_s__TabProxies); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__quote, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "TabProxies.pyx":495
  * cdef class NamedTupleProxy( TupleProxy ):
  * 
  *     map_key2field = {}             # <<<<<<<<<<<<<<
  * 
  *     def __setattr__(self, key, value ):
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   PyType_Modified(__pyx_ptype_10TabProxies_NamedTupleProxy);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":512
+  /* "TabProxies.pyx":517
  *     This class represents a GTF entry for fast read-access.
  *     '''
  *     map_key2field = {             # <<<<<<<<<<<<<<
  *         'contig' : (0, str),
  *         'start' : (1, int),
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":513
+  /* "TabProxies.pyx":518
  *     '''
  *     map_key2field = {
  *         'contig' : (0, str),             # <<<<<<<<<<<<<<
  *         'start' : (1, int),
  *         'end' : (2, int),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":514
+  /* "TabProxies.pyx":519
  *     map_key2field = {
  *         'contig' : (0, str),
  *         'start' : (1, int),             # <<<<<<<<<<<<<<
  *         'end' : (2, int),
  *         'name' : (3, str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__start), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":515
+  /* "TabProxies.pyx":520
  *         'contig' : (0, str),
  *         'start' : (1, int),
  *         'end' : (2, int),             # <<<<<<<<<<<<<<
  *         'name' : (3, str),
  *         'score' : (4, float),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_2);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
   __Pyx_GIVEREF(__pyx_int_2);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__end), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":516
+  /* "TabProxies.pyx":521
  *         'start' : (1, int),
  *         'end' : (2, int),
  *         'name' : (3, str),             # <<<<<<<<<<<<<<
  *         'score' : (4, float),
  *         'strand' : (5, str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":517
+  /* "TabProxies.pyx":522
  *         'end' : (2, int),
  *         'name' : (3, str),
  *         'score' : (4, float),             # <<<<<<<<<<<<<<
  *         'strand' : (5, str),
  *         'thickStart' : (6,int ),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_4);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
   __Pyx_GIVEREF(__pyx_int_4);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyFloat_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__score), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyFloat_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__score), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":518
+  /* "TabProxies.pyx":523
  *         'name' : (3, str),
  *         'score' : (4, float),
  *         'strand' : (5, str),             # <<<<<<<<<<<<<<
  *         'thickStart' : (6,int ),
  *         'thickEnd' : (7,int),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_5);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
   __Pyx_GIVEREF(__pyx_int_5);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__strand), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__strand), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":519
+  /* "TabProxies.pyx":524
  *         'score' : (4, float),
  *         'strand' : (5, str),
  *         'thickStart' : (6,int ),             # <<<<<<<<<<<<<<
  *         'thickEnd' : (7,int),
  *         'itemRGB' : (8,str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_6);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
   __Pyx_GIVEREF(__pyx_int_6);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickStart), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickStart), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":520
+  /* "TabProxies.pyx":525
  *         'strand' : (5, str),
  *         'thickStart' : (6,int ),
  *         'thickEnd' : (7,int),             # <<<<<<<<<<<<<<
  *         'itemRGB' : (8,str),
  *         'blockCount': (9,int),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_7);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
   __Pyx_GIVEREF(__pyx_int_7);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickEnd), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickEnd), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":521
+  /* "TabProxies.pyx":526
  *         'thickStart' : (6,int ),
  *         'thickEnd' : (7,int),
  *         'itemRGB' : (8,str),             # <<<<<<<<<<<<<<
  *         'blockCount': (9,int),
  *         'blockSizes': (10,str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_8);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
   __Pyx_GIVEREF(__pyx_int_8);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__itemRGB), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__itemRGB), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":522
+  /* "TabProxies.pyx":527
  *         'thickEnd' : (7,int),
  *         'itemRGB' : (8,str),
  *         'blockCount': (9,int),             # <<<<<<<<<<<<<<
  *         'blockSizes': (10,str),
  *         'blockStarts': (11,str), }
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_9);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_9);
   __Pyx_GIVEREF(__pyx_int_9);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockCount), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockCount), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":523
+  /* "TabProxies.pyx":528
  *         'itemRGB' : (8,str),
  *         'blockCount': (9,int),
  *         'blockSizes': (10,str),             # <<<<<<<<<<<<<<
  *         'blockStarts': (11,str), }
  * 
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_10);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_10);
   __Pyx_GIVEREF(__pyx_int_10);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockSizes), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockSizes), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":524
+  /* "TabProxies.pyx":529
  *         'blockCount': (9,int),
  *         'blockSizes': (10,str),
  *         'blockStarts': (11,str), }             # <<<<<<<<<<<<<<
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_11);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_11);
   __Pyx_GIVEREF(__pyx_int_11);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockStarts), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_BedProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockStarts), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_BedProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   PyType_Modified(__pyx_ptype_10TabProxies_BedProxy);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":578
+  /* "TabProxies.pyx":583
  *     The genotypes are accessed via index.
  *     '''
  *     map_key2field = {             # <<<<<<<<<<<<<<
  *         'contig' : (0, str),
  *         'pos' : (1, int),
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":579
+  /* "TabProxies.pyx":584
  *     '''
  *     map_key2field = {
  *         'contig' : (0, str),             # <<<<<<<<<<<<<<
  *         'pos' : (1, int),
  *         'id' : (2, str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":580
+  /* "TabProxies.pyx":585
  *     map_key2field = {
  *         'contig' : (0, str),
  *         'pos' : (1, int),             # <<<<<<<<<<<<<<
  *         'id' : (2, str),
  *         'ref' : (3, str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":581
+  /* "TabProxies.pyx":586
  *         'contig' : (0, str),
  *         'pos' : (1, int),
  *         'id' : (2, str),             # <<<<<<<<<<<<<<
  *         'ref' : (3, str),
  *         'alt' : (4, str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_2);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
   __Pyx_GIVEREF(__pyx_int_2);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__id), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__id), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":582
+  /* "TabProxies.pyx":587
  *         'pos' : (1, int),
  *         'id' : (2, str),
  *         'ref' : (3, str),             # <<<<<<<<<<<<<<
  *         'alt' : (4, str),
  *         'qual' : (5, str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ref), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ref), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":583
+  /* "TabProxies.pyx":588
  *         'id' : (2, str),
  *         'ref' : (3, str),
  *         'alt' : (4, str),             # <<<<<<<<<<<<<<
  *         'qual' : (5, str),
  *         'filter' : (6,str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_4);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
   __Pyx_GIVEREF(__pyx_int_4);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alt), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":584
+  /* "TabProxies.pyx":589
  *         'ref' : (3, str),
  *         'alt' : (4, str),
  *         'qual' : (5, str),             # <<<<<<<<<<<<<<
  *         'filter' : (6,str),
  *         'info' : (7,str),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_5);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
   __Pyx_GIVEREF(__pyx_int_5);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":585
+  /* "TabProxies.pyx":590
  *         'alt' : (4, str),
  *         'qual' : (5, str),
  *         'filter' : (6,str),             # <<<<<<<<<<<<<<
  *         'info' : (7,str),
  *         'format' : (8,str) }
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_6);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
   __Pyx_GIVEREF(__pyx_int_6);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__filter), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":586
+  /* "TabProxies.pyx":591
  *         'qual' : (5, str),
  *         'filter' : (6,str),
  *         'info' : (7,str),             # <<<<<<<<<<<<<<
  *         'format' : (8,str) }
  * 
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_7);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
   __Pyx_GIVEREF(__pyx_int_7);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__info), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":587
+  /* "TabProxies.pyx":592
  *         'filter' : (6,str),
  *         'info' : (7,str),
  *         'format' : (8,str) }             # <<<<<<<<<<<<<<
  * 
  *     def __cinit__(self ):
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_8);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
   __Pyx_GIVEREF(__pyx_int_8);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_VCFProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_VCFProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   PyType_Modified(__pyx_ptype_10TabProxies_VCFProxy);
 
-  /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":1
+  /* "TabProxies.pyx":1
  * import types             # <<<<<<<<<<<<<<
  * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
  * 
  */
   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_28), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_29), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_30), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____str__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_31), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_32), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__quote); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_33), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_34), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_35), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__invert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_36), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_37), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_38), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setAttribute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_39), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__NamedTupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_40), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__BedProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_41), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_42), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/apps/apps/python-2.7.1/lib/python2.7/site-packages/Cython-0.13-py2.7-linux-x86_64.egg/Cython/Includes/cpython/type.pxd":2
+  /* "cpython/type.pxd":2
  * 
  * cdef extern from "Python.h":             # <<<<<<<<<<<<<<
  *     # The C structure of the objects used to describe built-in types.
@@ -8689,7 +8900,6 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
   if (__pyx_m) {
     __Pyx_AddTraceback("init TabProxies");
     Py_DECREF(__pyx_m); __pyx_m = 0;
@@ -8715,6 +8925,143 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
     return result;
 }
 
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+    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);
+}
+
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+    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;
+}
+
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    Py_XINCREF(type);
+    Py_XINCREF(value);
+    Py_XINCREF(tb);
+    /* First, check the traceback argument, replacing None with NULL. */
+    if (tb == Py_None) {
+        Py_DECREF(tb);
+        tb = 0;
+    }
+    else if (tb != NULL && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto raise_error;
+    }
+    /* Next, replace a missing value with None */
+    if (value == NULL) {
+        value = Py_None;
+        Py_INCREF(value);
+    }
+    #if PY_VERSION_HEX < 0x02050000
+    if (!PyClass_Check(type))
+    #else
+    if (!PyType_Check(type))
+    #endif
+    {
+        /* Raising an instance.  The value should be a dummy. */
+        if (value != Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        /* Normalize to raise <class>, <instance> */
+        Py_DECREF(value);
+        value = type;
+        #if PY_VERSION_HEX < 0x02050000
+            if (PyInstance_Check(type)) {
+                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+                Py_INCREF(type);
+            }
+            else {
+                type = 0;
+                PyErr_SetString(PyExc_TypeError,
+                    "raise: exception must be an old-style class or instance");
+                goto raise_error;
+            }
+        #else
+            type = (PyObject*) Py_TYPE(type);
+            Py_INCREF(type);
+            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+                PyErr_SetString(PyExc_TypeError,
+                    "raise: exception class must be a subclass of BaseException");
+                goto raise_error;
+            }
+        #endif
+    }
+
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+
+#else /* Python 3+ */
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    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)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+
+    PyErr_SetObject(type, value);
+
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+
+bad:
+    return;
+}
+#endif
+
 static void __Pyx_RaiseArgtupleInvalid(
     const char* func_name,
     int exact,
@@ -8779,6 +9126,48 @@ invalid_keyword:
     return 0;
 }
 
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+        #if PY_VERSION_HEX < 0x02050000
+                 "need more than %d value%s to unpack", (int)index,
+        #else
+                 "need more than %zd value%s to unpack", index,
+        #endif
+                 (index == 1) ? "" : "s");
+}
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+    PyErr_Format(PyExc_ValueError,
+        #if PY_VERSION_HEX < 0x02050000
+            "too many values to unpack (expected %d)", (int)expected);
+        #else
+            "too many values to unpack (expected %zd)", expected);
+        #endif
+}
+
+static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
+    PyObject *item;
+    if (!(item = PyIter_Next(iter))) {
+        if (!PyErr_Occurred()) {
+            __Pyx_RaiseNeedMoreValuesError(index);
+        }
+    }
+    return item;
+}
+
+static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
+    PyObject *item;
+    if ((item = PyIter_Next(iter))) {
+        Py_DECREF(item);
+        __Pyx_RaiseTooManyValuesError(expected);
+        return -1;
+    }
+    else if (!PyErr_Occurred())
+        return 0;
+    else
+        return -1;
+}
+
 static void __Pyx_RaiseDoubleKeywordsError(
     const char* func_name,
     PyObject* kw_name)
@@ -8899,48 +9288,6 @@ bad:
     return (double)-1;
 }
 
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-    PyErr_Format(PyExc_ValueError,
-        #if PY_VERSION_HEX < 0x02050000
-                 "need more than %d value%s to unpack", (int)index,
-        #else
-                 "need more than %zd value%s to unpack", index,
-        #endif
-                 (index == 1) ? "" : "s");
-}
-
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
-    PyErr_Format(PyExc_ValueError,
-        #if PY_VERSION_HEX < 0x02050000
-            "too many values to unpack (expected %d)", (int)expected);
-        #else
-            "too many values to unpack (expected %zd)", expected);
-        #endif
-}
-
-static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
-    PyObject *item;
-    if (!(item = PyIter_Next(iter))) {
-        if (!PyErr_Occurred()) {
-            __Pyx_RaiseNeedMoreValuesError(index);
-        }
-    }
-    return item;
-}
-
-static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
-    PyObject *item;
-    if ((item = PyIter_Next(iter))) {
-        Py_DECREF(item);
-        __Pyx_RaiseTooManyValuesError(expected);
-        return -1;
-    }
-    else if (!PyErr_Occurred())
-        return 0;
-    else
-        return -1;
-}
-
 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
     PyThreadState *tstate = PyThreadState_GET();
     *type = tstate->exc_type;
@@ -8998,143 +9345,6 @@ bad:
     return module;
 }
 
-static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
-    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);
-}
-
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
-    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;
-}
-
-
-#if PY_MAJOR_VERSION < 3
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
-    Py_XINCREF(type);
-    Py_XINCREF(value);
-    Py_XINCREF(tb);
-    /* First, check the traceback argument, replacing None with NULL. */
-    if (tb == Py_None) {
-        Py_DECREF(tb);
-        tb = 0;
-    }
-    else if (tb != NULL && !PyTraceBack_Check(tb)) {
-        PyErr_SetString(PyExc_TypeError,
-            "raise: arg 3 must be a traceback or None");
-        goto raise_error;
-    }
-    /* Next, replace a missing value with None */
-    if (value == NULL) {
-        value = Py_None;
-        Py_INCREF(value);
-    }
-    #if PY_VERSION_HEX < 0x02050000
-    if (!PyClass_Check(type))
-    #else
-    if (!PyType_Check(type))
-    #endif
-    {
-        /* Raising an instance.  The value should be a dummy. */
-        if (value != Py_None) {
-            PyErr_SetString(PyExc_TypeError,
-                "instance exception may not have a separate value");
-            goto raise_error;
-        }
-        /* Normalize to raise <class>, <instance> */
-        Py_DECREF(value);
-        value = type;
-        #if PY_VERSION_HEX < 0x02050000
-            if (PyInstance_Check(type)) {
-                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
-                Py_INCREF(type);
-            }
-            else {
-                type = 0;
-                PyErr_SetString(PyExc_TypeError,
-                    "raise: exception must be an old-style class or instance");
-                goto raise_error;
-            }
-        #else
-            type = (PyObject*) Py_TYPE(type);
-            Py_INCREF(type);
-            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
-                PyErr_SetString(PyExc_TypeError,
-                    "raise: exception class must be a subclass of BaseException");
-                goto raise_error;
-            }
-        #endif
-    }
-
-    __Pyx_ErrRestore(type, value, tb);
-    return;
-raise_error:
-    Py_XDECREF(value);
-    Py_XDECREF(type);
-    Py_XDECREF(tb);
-    return;
-}
-
-#else /* Python 3+ */
-
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
-    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)) {
-        PyErr_SetString(PyExc_TypeError,
-            "raise: exception class must be a subclass of BaseException");
-        goto bad;
-    }
-
-    PyErr_SetObject(type, value);
-
-    if (tb) {
-        PyThreadState *tstate = PyThreadState_GET();
-        PyObject* tmp_tb = tstate->curexc_traceback;
-        if (tb != tmp_tb) {
-            Py_INCREF(tb);
-            tstate->curexc_traceback = tb;
-            Py_XDECREF(tmp_tb);
-        }
-    }
-
-bad:
-    return;
-}
-#endif
-
 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) {
     const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
     const int is_unsigned = const_zero < neg_one;
@@ -9675,13 +9885,13 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
     if (!result)
         goto bad;
     if (!PyType_Check(result)) {
-        PyErr_Format(PyExc_TypeError, 
+        PyErr_Format(PyExc_TypeError,
             "%s.%s is not a type object",
             module_name, class_name);
         goto bad;
     }
     if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
-        PyOS_snprintf(warning, sizeof(warning), 
+        PyOS_snprintf(warning, sizeof(warning),
             "%s.%s size changed, may indicate binary incompatibility",
             module_name, class_name);
         #if PY_VERSION_HEX < 0x02050000
@@ -9691,7 +9901,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
         #endif
     }
     else if (((PyTypeObject *)result)->tp_basicsize != size) {
-        PyErr_Format(PyExc_ValueError, 
+        PyErr_Format(PyExc_ValueError,
             "%s.%s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
index 32597af090b33ad5c474c0231b4e940c073818c7..cf11852644eccc583eb5e735961c3987be1f5652 100644 (file)
@@ -51,6 +51,7 @@ cdef class TupleProxy:
         cdef bint is_modified
 
     cdef int getMaxFields( self, size_t nbytes )
+#    cdef char * _getindex( self, int idx )
 
     cdef take( self, char * buffer, size_t nbytes )
     cdef present( self, char * buffer, size_t nbytes )
index 36295ebe12ccba9584b2b30be907fe848601f537..6e3a866d07c212b148cb7c4835a862ba85842ced 100644 (file)
@@ -141,16 +141,25 @@ cdef class TupleProxy:
 
         self.nfields = field
 
-    def __getitem__( self, key ):
-
-        cdef int i = key
+    def _getindex( self, int index ):
+        '''return item at idx index'''
+        cdef int i = index
         if i < 0: i += self.nfields
         if i < 0: raise IndexError( "list index out of range" )
         i += self.offset
         if i >= self.nfields:
-            raise IndexError( "list index out of range)
+            raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
         return self.fields[i]
 
+    def __getitem__( self, key ):
+        if type(key) == int: return self._getindex( key )
+        # slice object
+        start, end, step = key.indices( self.nfields )
+        result = []
+        for index in range( start, end, step ):
+            result.append( self._getindex( index ) )
+        return result
+
     def _setindex( self, index, value ):
         '''set item at idx index.'''
         cdef int idx = index
@@ -279,7 +288,8 @@ cdef class GTFProxy( TupleProxy ):
 
         self.start = atoi( cstart ) - 1
         self.end = atoi( cend )
-                      
+        self.nfields = 9
+       
     property contig:
        '''contig of feature.'''
        def __get__( self ): return self.contig
@@ -443,8 +453,8 @@ cdef class GTFProxy( TupleProxy ):
         r = self.attributes
         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
 
-    def __getitem__(self, item):
-        return self.__getattr__( item )
+    def __getitem__(self, key):
+        return self.__getattr__( key )
 
     def __getattr__(self, item ):
         """Generic lookup of attribute from GFF/GTF attributes 
@@ -463,18 +473,13 @@ cdef class GTFProxy( TupleProxy ):
 
         start += strlen(query) + 1
         # skip gaps before
-        while start[0] == " ": start += 1
+        while start[0] == ' ': start += 1
         if start[0] == '"':
             start += 1
             end = start
             while end[0] != '\0' and end[0] != '"': end += 1
-            l = end - start + 1
-            cpy = <char*>calloc( l, sizeof(char ) )
-            if cpy == NULL: raise ValueError("out of memory" )
-            memcpy( cpy, start, l )
-            cpy[l-1] = '\0'
-            result = cpy
-            free(cpy)
+            l = end - start
+            result = PyString_FromStringAndSize( start, l )
             return result
         else:
             return start
@@ -601,10 +606,15 @@ cdef class VCFProxy( NamedTupleProxy ):
         self.contig = self.fields[0]
         # vcf counts from 1 - correct here
         self.pos = atoi( self.fields[1] ) - 1
-
+                             
     def __len__(self):
         return max(0, self.nfields - 9)
 
+    property pos:
+       '''feature end (in 0-based open/closed coordinates).'''
+       def __get__( self ): 
+           return self.pos
+
     def __setattr__(self, key, value ):
         '''set attribute.'''
         if key == "pos": 
@@ -614,4 +624,4 @@ cdef class VCFProxy( NamedTupleProxy ):
         cdef int idx
         idx, f = self.map_key2field[key]
         TupleProxy._setindex(self, idx, str(value) )
-    
+
diff --git a/pysam/VCF.py b/pysam/VCF.py
deleted file mode 100644 (file)
index 115aa2b..0000000
+++ /dev/null
@@ -1,1088 +0,0 @@
-#
-# Code to read, write and edit VCF files
-#
-# VCF lines are encoded as a dictionary with these keys (note: all lowercase):
-# 'chrom':  string
-# 'pos':    integer
-# 'id':     string
-# 'ref':    string
-# 'alt':    list of strings
-# 'qual':   integer
-# 'filter': None (missing value), or list of keys (strings); empty list parsed as ["PASS"]
-# 'info':   dictionary of values (see below)
-# 'format': list of keys (strings)
-# sample keys: dictionary of values (see below)
-#
-# The sample keys are accessible through vcf.getsamples()
-#
-# A dictionary of values contains value keys (defined in ##INFO or ##FORMAT lines) which map
-# to a list, containign integers, floats, strings, or characters.  Missing values are replaced 
-# by a particular value, often -1 or .
-#
-# Genotypes are not stored as a string, but as a list of 1 or 3 elements (for haploid and diploid samples),
-# the first (and last) the integer representing an allele, and the second the separation character.
-# Note that there is just one genotype per sample, but for consistency the single element is stored in a list.
-#
-# Header lines other than ##INFO, ##FORMAT and ##FILTER are stored as (key, value) pairs and are accessible
-# through getheader()
-#
-# The VCF class can be instantiated with a 'regions' variable consisting of tuples (chrom,start,end) encoding
-# 0-based half-open segments.  Only variants with a position inside the segment will be parsed.  A regions
-# parser is available under parse_regions.
-#
-# When instantiated, a reference can be passed to the VCF class.  This may be any class that supports a
-# fetch(chrom, start, end) method.
-#
-#
-#
-# NOTE: the position that is returned to Python is 0-based, NOT 1-based as in the VCF file.
-#
-#
-#
-# TODO:
-#  only v4.0 writing is complete; alleles are not converted to v3.3 format
-#
-
-from collections import namedtuple, defaultdict
-from operator import itemgetter
-import sys, re, copy, bisect
-
-import pysam
-
-gtsRegEx = re.compile("[|/\\\\]")
-alleleRegEx = re.compile('^[ACGTN]+$')
-
-# Utility function.  Uses 0-based coordinates
-def get_sequence(chrom, start, end, fa):
-    # obtain sequence from .fa file, without truncation
-    if end<=start: return ""
-    if not fa: return "N"*(end-start)
-    if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
-    sequence = fa.fetch(chrom, start, end).upper()
-    if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))
-    return sequence
-
-# Utility function.  Parses a region string
-def parse_regions( string ):
-    result = []
-    for r in string.split(','):
-        elts = r.split(':')
-        chrom, start, end = elts[0], 0, 3000000000
-        if len(elts)==1: pass
-        elif len(elts)==2:
-            if len(elts[1])>0:
-                ielts = elts[1].split('-')
-                if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
-                try:    start, end = int(ielts[0])-1, int(ielts[1])
-                except: raise ValueError("Don't understand region string '%s'" % r)
-        else:
-            raise ValueError("Don't understand region string '%s'" % r)
-        result.append( (chrom,start,end) )
-    return result
-            
-
-FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue')
-
-###########################################################################################################
-# 
-# New class
-# 
-###########################################################################################################
-
-class VCFRecord:
-    '''vcf record.
-
-    initialized from data and vcf meta 
-    '''
-    
-    data = None
-    vcf = None
-
-    def __init__(self, data, vcf):
-        self.data, self.vcf = data, vcf
-
-        if len(data) != len(self.vcf._samples):
-            self.error(str(data),
-                       self.BAD_NUMBER_OF_COLUMNS, 
-                       "expected %s for %s samples (%s), got %s" % \
-                           (len(self.vcf._samples), 
-                            len(self.vcf._samples), 
-                            self.vcf._samples, 
-                            len(data)))
-        
-    property contig:
-    def contig( self ): return self.data[0]
-
-    property pos:
-    def __get__( self ): 
-            return self.data.pos
-        
-    property id:
-        def __get__( self ): return self.data[2]
-
-    property ref:
-        def __get__(self ): 
-            # note: gerton substitutes reference if it can be fixed.
-            return self.data[3].upper()
-
-    property alt:
-        def __get__(self):
-            # convert v3.3 to v4.0 alleles below
-            alt = self.data[4] 
-            if alt == ".": alt = []
-            else: alt = alt.upper().split(',')
-            return alt
-
-    property qual:
-        def __get__(self):
-            qual = self.data[5]
-            if qual == ".": qual = -1
-            else: 
-                try:    qual = float(qual)
-                except: self.error(line,self.QUAL_NOT_NUMERICAL)
-
-    property filter:
-        def __get__(self):
-            # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
-            if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []
-            else: filter = cols[6].split(';')
-
-            return filter
-
-    property info:
-        def __get__(self):
-            col = self.data[7]
-            # dictionary of keys, and list of values
-            info = {}
-            if col != ".":
-                for blurp in col.split(';'):
-                    elts = blurp.split('=')
-                    if len(elts) == 1: v = None
-                    elif len(elts) == 2: v = elts[1]
-                    else: self.error(str(self.data),self.ERROR_INFO_STRING)
-                    info[elts[0]] = self.parse_formatdata(elts[0], v, self.vcf._info, line)
-            return info
-
-    property format:
-         def __get__(self):
-             return self.data[8].split(':')
-
-    def __getitem__(self, key):
-        
-        # parse sample columns
-        values = self.data[self.vcf._sample2column[key]].split(':')
-        alt = self.alt
-        format = self.format
-
-        if len(values) > len(format):
-            self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
-
-        result = {}
-        for idx in range(len(format)):
-            expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
-            if idx < len(values): value = values[idx]
-            else:
-                if expected == -1: value = "."
-                else: value = ",".join(["."]*expected)
-
-            result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, line)
-            if expected != -1 and len(result[format[idx]]) != expected:
-                self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
-                           "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
-                if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))
-                result[format[idx]] = result[format[idx]][:expected]
-
-        return result
-    def __str__(self):
-        return str(self.data)
-
-class VCF:
-
-    # types
-    NT_UNKNOWN = 0
-    NT_NUMBER = 1
-    NT_ALLELES = 2
-    NT_NR_ALLELES = 3
-    NT_GENOTYPES = 4
-    NT_PHASED_GENOTYPES = 5
-
-    _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier",
-                1:"BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string",
-                2:"BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s",
-                3:"BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)",
-                4:"POS_NOT_NUMERICAL:Position column is not numerical",
-                5:"UNKNOWN_CHAR_IN_REF:Unknown character in reference field",
-                6:"V33_BAD_REF:Reference should be single-character in v3.3 VCF",
-                7:"V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF",
-                8:"POS_NOT_POSITIVE:Position field must be >0",
-                9:"QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'",
-               10:"ERROR_INFO_STRING:Error while parsing info field",
-               11:"ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)",
-               12:"ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s",
-               13:"ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string",
-               14:"FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header",
-               15:"FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header",
-               16:"BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)",
-               17:"BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)",
-               18:"BAD_GENOTYPE:Cannot parse genotype (%s)",
-               19:"V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)",
-               20:"MISSING_REF:Reference allele missing",
-               21:"V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)",
-               22:"V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets",
-               23:"FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes",
-               24:"V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields",
-               25:"HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs",
-               26:"WRONG_REF:Wrong reference %s",
-               27:"ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data",
-               28:"BAD_CHR_TAG:Error calculating chr tag for %s",
-               29:"ZERO_LENGTH_ALLELE:Found zero-length allele",
-               30:"MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base"
-                }
-
-    # tag-value pairs; tags are not unique; does not include fileformat, INFO, FILTER or FORMAT fields
-    _header = []
-
-    # version number; 33=v3.3; 40=v4.0
-    _version = 40
-
-    # info, filter and format data
-    _info = {}
-    _filter = {}
-    _format = {}
-
-    # header; and required columns
-    _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]
-    _samples = []
-
-    # control behaviour
-    _ignored_errors = set([11])   # ERROR_UNKNOWN_KEY
-    _warn_errors = set([])
-    _leftalign = False
-
-    # reference sequence
-    _reference = None
-
-    # regions to include; None includes everything
-    _regions = None
-
-    # statefull stuff
-    _lineno = -1
-    _line = None
-    _lines = None
-
-    def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
-        # make error identifiers accessible by name
-        for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
-        if _copy != None:
-            self._leftalign = _copy._leftalign
-            self._header = _copy._header[:]
-            self._version = _copy._version
-            self._info = copy.deepcopy(_copy._info)
-            self._filter = copy.deepcopy(_copy._filter)
-            self._format = copy.deepcopy(_copy._format)
-            self._samples = _copy._samples[:]
-            self._sample2column = copy.deepcopy(_copy._sample2column)
-            self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
-            self._warn_errors = copy.deepcopy(_copy._warn_errors)
-            self._reference = _copy._reference
-            self._regions = _copy._regions
-        if reference: self._reference = reference
-        if regions: self._regions = regions
-        if leftalign: self._leftalign = leftalign
-        self._lines = lines
-
-    def error(self,line,error,opt=None):
-        if error in self._ignored_errors: return
-        errorlabel, errorstring = self._errors[error].split(':')
-        if opt: errorstring = errorstring % opt
-        errwarn = ["Error","Warning"][error in self._warn_errors]
-        sys.stderr.write("Line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring))
-        if error in self._warn_errors: return
-        raise ValueError(errorstring)
-
-    def parse_format(self,line,format,filter=False):
-        if self._version == 40:
-            if not format.startswith('<'): 
-                self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
-                format = "<"+format
-            if not format.endswith('>'): 
-                self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
-                format += ">"
-            format = format[1:-1]
-        data = {'id':None,'number':None,'type':None,'descr':None}
-        idx = 0
-        while len(format.strip())>0:
-            elts = format.strip().split(',')
-            first, rest = elts[0], ','.join(elts[1:])
-            if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
-                if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
-                if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-                first = ["ID=","Number=","Type=","Description="][idx] + first
-            if first.startswith('ID='):            data['id'] = first.split('=')[1]
-            elif first.startswith('Number='):      data['number'] = first.split('=')[1]
-            elif first.startswith('Type='):        data['type'] = first.split('=')[1]
-            elif first.startswith('Description='):
-                elts = format.split('"')
-                if len(elts)<3: 
-                    self.error(line,self.FORMAT_MISSING_QUOTES)
-                    elts = first.split('=') + [rest] 
-                data['descr'] = elts[1]
-                rest = '"'.join(elts[2:])
-                if rest.startswith(','): rest = rest[1:]
-            else:
-                self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-            format = rest
-            idx += 1
-            if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
-        if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-        if not data['descr']: 
-            self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-            data['descr'] = '<none>'
-        if not data['type'] and not data['number']:
-            # fine, ##filter format
-            return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
-        if not data['type'] in ["Integer","Float","Character","String","Flag"]:
-            self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-        # I would like a missing-value field, but it isn't there
-        if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value
-        else:                                   data['missing'] = '.'
-        if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-        try:
-            n = int(data['number'])
-            t = self.NT_NUMBER
-        except ValueError:
-            n = -1
-            if data['number'] == '.':                   t = self.NT_UNKNOWN
-            elif data['number'] == '#alleles':          t = self.NT_ALLELES
-            elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
-            elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
-            elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
-            else:
-                self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
-        return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
-    
-
-    def format_format( self, fmt, filter=False ):
-        values = [('ID',fmt.id)]
-        if fmt.number != None and not filter:
-            if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
-            elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
-            elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
-            elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
-            elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"
-            elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"
-            else:
-                raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
-            values.append( ('Number',nmb) )
-            values.append( ('Type', fmt.type) )
-        values.append( ('Description', '"' + fmt.description + '"') )
-        if self._version == 33:
-            format = ",".join(v for k,v in values)
-        else:
-            format = "<" + (",".join( "%s=%s" % (k,v) for (k,v) in values )) + ">"
-        return format
-
-    def get_expected(self, format, formatdict, alt):
-        fmt = formatdict[format]
-        if fmt.numbertype == self.NT_UNKNOWN: return -1
-        if fmt.numbertype == self.NT_NUMBER: return fmt.number
-        if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
-        if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
-        if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
-        if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)
-        return 0
-
-
-    def _add_definition(self, formatdict, key, data, line ):
-        if key in formatdict: return
-        self.error(line,self.ERROR_UNKNOWN_KEY,key)
-        if data == None:
-            formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
-            return
-        if data == []: data = [""]             # unsure what type -- say string
-        if type(data[0]) == type(0.0):
-            formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
-            return
-        if type(data[0]) == type(0):
-            formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
-            return
-        formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".")
-
-
-    # todo: trim trailing missing values
-    def format_formatdata( self, data, format, key=True, value=True, separator=":" ):
-        output, sdata = [], []
-        if type(data) == type([]): # for FORMAT field, make data with dummy values
-            d = {}
-            for k in data: d[k] = []
-            data = d
-        # convert missing values; and silently add definitions if required
-        for k in data:
-            self._add_definition( format, k, data[k], "(output)" )
-            for idx,v in enumerate(data[k]):
-                if v == format[k].missingvalue: data[k][idx] = "."
-        # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
-        for k in data: 
-            if k != 'GT': sdata.append( (k,data[k]) )
-        sdata.sort()
-        if 'GT' in data:
-            sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
-        for k,v in sdata:
-            if v == []: v = None
-            if key and value:
-                if v != None: output.append( k+"="+','.join(map(str,v)) )
-                else: output.append( k )
-            elif key: output.append(k)
-            elif value:
-                if v != None: output.append( ','.join(map(str,v)) )
-                else: output.append( "." )                    # should not happen
-        # snip off trailing missing data
-        while len(output) > 1:
-            last = output[-1].replace(',','').replace('.','')
-            if len(last)>0: break
-            output = output[:-1]
-        return separator.join(output)
-
-
-    def enter_default_format(self):
-        for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
-                  FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
-                  FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
-                  FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
-                  FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.')]:
-            if f.id not in self._format:
-                self._format[f.id] = f
-
-    def parse_header( self, line ):
-        assert line.startswith('##')
-        elts = line[2:].split('=')
-        key = elts[0].strip()
-        value = '='.join(elts[1:]).strip()
-        if key == "fileformat":
-            if value == "VCFv3.3":
-                self._version = 33
-            elif value == "VCFv4.0":
-                self._version = 40
-            elif value == "VCFv4.1":
-                # AH - for testing
-                self._version = 40
-            else:
-                self.error(line,self.UNKNOWN_FORMAT_STRING)
-        elif key == "INFO":
-            f = self.parse_format(line, value)
-            self._info[ f.id ] = f
-        elif key == "FILTER":
-            f = self.parse_format(line, value, filter=True)
-            self._filter[ f.id ] = f
-        elif key == "FORMAT":
-            f = self.parse_format(line, value)
-            self._format[ f.id ] = f
-        else:
-            # keep other keys in the header field
-            self._header.append( (key,value) )
-
-
-    def write_header( self, stream ):
-        stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
-        for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
-        for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:
-            for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER"))))
-        
-
-    def parse_heading( self, line ):
-        assert line.startswith('#')
-        assert not line.startswith('##')
-        headings = line[1:].split('\t')
-        if len(headings)==1 and len(line[1:].split()) >= 9:
-            self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
-            headings = line[1:].split()
-
-        for i,s in enumerate(self._required):
-
-            if len(headings)<=i or headings[i] != s:
-
-                if len(headings) <= i: 
-                    err = "(%sth entry not found)" % (i+1)
-                else:
-                    err = "(found %s, expected %s)" % (headings[i],s)
-
-                #self.error(line,self.BADLY_FORMATTED_HEADING,err)
-
-                # allow FORMAT column to be absent
-                if len(headings) == 8:
-                    headings.append("FORMAT")
-                else:
-                    self.error(line,self.BADLY_FORMATTED_HEADING,err)
-
-        self._samples = headings[9:]
-        self._sample2column = dict( [(y,x) for x,y in enumerate( self._samples ) ] )
-                           
-    def write_heading( self, stream ):
-        stream.write("#" + "\t".join(self._required + self._samples) + "\n")
-
-    def convertGT(self, GTstring):
-        if GTstring == ".": return ["."]
-        try:
-            gts = gtsRegEx.split(GTstring)
-            if len(gts) == 1: return [int(gts[0])]
-            if len(gts) != 2: raise ValueError()
-            if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
-            return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
-        except ValueError:
-            self.error(self._line,self.BAD_GENOTYPE,GTstring)
-            return [".","|","."]
-
-
-    def convertGTback(self, GTdata):
-        return ''.join(map(str,GTdata))
-
-    def parse_formatdata( self, key, value, formatdict, line ):
-        # To do: check that the right number of values is present
-        f = formatdict.get(key,None)
-        if f == None:
-            self._add_definition(formatdict, key, value, line )
-            f = formatdict[key]
-        if f.type == "Flag":
-            if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
-            return []
-        values = value.split(',')
-        # deal with trailing data in some early VCF files
-        if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
-            self.error(line,self.ERROR_TRAILING_DATA,values[-1])
-            values[-1] = values[-1].split(';')[0]
-        if f.type == "Integer": 
-            for idx,v in enumerate(values):
-                try:
-                    if v == ".": values[idx] = f.missingvalue
-                    else:        values[idx] = int(v)
-                except: 
-                    self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)
-                    return [0] * len(values)
-            return values
-        elif f.type == "String":
-            self._line = line
-            if f.id == "GT": values = map( self.convertGT, values )
-            return values
-        elif f.type == "Character":
-            for v in values: 
-                if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
-            return values
-        elif f.type == "Float":
-            for idx,v in enumerate(values):
-                if v == ".": values[idx] = f.missingvalue
-            try: return map(float,values)
-            except:
-                self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)
-                return [0.0] * len(values)
-        else:
-            # can't happen
-            self.error(line,self.ERROR_INFO_STRING)
-
-
-    def inregion(self, chrom, pos):
-        if not self._regions: return True
-        for r in self._regions:
-            if r[0] == chrom and r[1] <= pos < r[2]: return True
-        return False
-        
-
-    def parse_data( self, line, lineparse=False ):
-        cols = line.split('\t')
-        if len(cols) != len(self._samples)+9:
-            # gracefully deal with absent FORMAT column
-            if len(cols) == 8 and len(self._samples)==0:
-                cols.append("")
-            else:
-                self.error(line,
-                           self.BAD_NUMBER_OF_COLUMNS, 
-                           "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
-
-        chrom = cols[0]
-
-        # get 0-based position
-        try:    pos = int(cols[1])-1
-        except: self.error(line,self.POS_NOT_NUMERICAL)
-        if pos < 0: self.error(line,self.POS_NOT_POSITIVE)
-
-        # implement filtering
-        if not self.inregion(chrom,pos): return None
-
-        # end of first-pass parse for sortedVCF
-        if lineparse: return chrom, pos, line
-        
-        id = cols[2]
-
-        ref = cols[3].upper()
-        if ref == ".":
-            self.error(line,self.MISSING_REF)
-            if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
-            else:                   ref = ""
-        else:
-            for c in ref:
-                if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF)
-            if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)
-
-        # make sure reference is sane
-        if self._reference:
-            left = max(0,pos-100)
-            faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
-            faref = faref_leftflank[pos-left:]
-            if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
-            ref = faref
-
-        # convert v3.3 to v4.0 alleles below
-        if cols[4] == ".": alt = []
-        else: alt = cols[4].upper().split(',')
-
-        if cols[5] == ".": qual = -1
-        else: 
-            try:    qual = float(cols[5])
-            except: self.error(line,self.QUAL_NOT_NUMERICAL)
-
-        # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
-        if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []
-        else: filter = cols[6].split(';')
-
-        # dictionary of keys, and list of values
-        info = {}
-        if cols[7] != ".":
-            for blurp in cols[7].split(';'):
-                elts = blurp.split('=')
-                if len(elts) == 1: v = None
-                elif len(elts) == 2: v = elts[1]
-                else: self.error(line,self.ERROR_INFO_STRING)
-                info[elts[0]] = self.parse_formatdata(elts[0], v, self._info, line)
-
-        # Gracefully deal with absent FORMAT column
-        if cols[8] == "": format = []
-        else: format = cols[8].split(':')
-
-        # check: all filters are defined
-        for f in filter:
-            if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f)
-            
-        # check: format fields are defined
-        for f in format:
-            if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)
-
-        # convert v3.3 alleles
-        if self._version == 33:
-            if len(ref) != 1: self.error(line,self.V33_BAD_REF)
-            newalts = []
-            have_deletions = False
-            for a in alt:
-                if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
-                elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
-                elif a.startswith('D'): # allow D<seq> and D<num>
-                    have_deletions = True
-                    try:
-                        l = int(a[1:])          # throws ValueError if sequence
-                        if len(ref) < l:        # add to reference if necessary
-                            addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
-                            ref += addns
-                            for i,na in enumerate(newalts): newalts[i] = na+addns
-                        a = ref[l:]             # new deletion, deleting pos...pos+l
-                    except ValueError:
-                        s = a[1:]
-                        if len(ref) < len(s):   # add Ns to reference if necessary
-                            addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
-                            if not s.endswith(addns) and addns != 'N'*len(addns):
-                                self.error(line,self.V33_UNMATCHED_DELETION,
-                                           "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
-                            ref += addns
-                            for i,na in enumerate(newalts): newalts[i] = na+addns
-                        a = ref[len(s):]        # new deletion, deleting from pos
-                else:
-                    self.error(line,self.V33_BAD_ALLELE)
-                newalts.append(a)
-            alt = newalts
-            # deletion alleles exist, add dummy 1st reference allele, and account for leading base
-            if have_deletions:
-                if pos == 0:
-                    # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
-                    addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
-                    ref += addn
-                    alt = [allele+addn for allele in alt]
-                else:
-                    addn = get_sequence(chrom,pos-1,pos,self._reference)
-                    ref = addn + ref
-                    alt = [addn + allele for allele in alt]
-                    pos -= 1
-        else:
-            # format v4.0 -- just check for nucleotides
-            for allele in alt:
-                if not alleleRegEx.match(allele):
-                    self.error(line,self.V40_BAD_ALLELE,allele)
-
-        # check for leading nucleotide in indel calls
-        for allele in alt:
-            if len(allele) != len(ref):
-                if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
-                if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
-                    self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
-
-        # trim trailing bases in alleles
-        for i in range(1,min(len(ref),min(map(len,alt)))):
-            if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
-                break
-            ref, alt = ref[:-1], [allele[:-1] for allele in alt]
-
-        # left-align alleles, if a reference is available
-        if self._leftalign and self._reference:
-            while left < pos:
-                movable = True
-                for allele in alt:
-                    if len(allele) > len(ref):
-                        longest, shortest = allele, ref
-                    else:
-                        longest, shortest = ref, allele
-                    if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
-                        movable = False
-                    if longest[-1].upper() != longest[len(shortest)-1].upper():
-                        movable = False
-                if not movable:
-                    break
-                ref = ref[:-1]
-                alt = [allele[:-1] for allele in alt]
-                if min(len(allele) for allele in alt) == 0 or len(ref) == 0:
-                    ref = faref_leftflank[pos-left-1] + ref
-                    alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
-                    pos -= 1
-
-        # parse sample columns
-        samples = []
-        for sample in cols[9:]:
-            dict = {}
-            values = sample.split(':')
-            if len(values) > len(format):
-                self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
-            for idx in range(len(format)):
-                expected = self.get_expected(format[idx], self._format, alt)
-                if idx < len(values): value = values[idx]
-                else:
-                    if expected == -1: value = "."
-                    else: value = ",".join(["."]*expected)
-                dict[format[idx]] = self.parse_formatdata(format[idx], value, self._format, line)
-                if expected != -1 and len(dict[format[idx]]) != expected:
-                    self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
-                               "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
-                    if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
-                    dict[format[idx]] = dict[format[idx]][:expected]
-            samples.append( dict )
-
-        # done
-        d = {'chrom':chrom,
-             'pos':pos,      # return 0-based position
-             'id':id,
-             'ref':ref,
-             'alt':alt,
-             'qual':qual,
-             'filter':filter,
-             'info':info,
-             'format':format}
-        for key,value in zip(self._samples,samples):
-            d[key] = value
-        
-        return d
-
-
-    def write_data(self, stream, data):
-        required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
-        for k in required:
-            if k not in data: raise ValueError("Required key %s not found in data" % str(k))
-        if data['alt'] == []: alt = "."
-        else: alt = ",".join(data['alt'])
-        if data['filter'] == None: filter = "."
-        elif data['filter'] == []: 
-            if self._version == 33: filter = "0"
-            else: filter = "PASS"
-        else: filter = ';'.join(data['filter'])
-        if data['qual'] == -1: qual = "."
-        else: qual = str(data['qual'])
-
-        output = [data['chrom'], 
-                  str(data['pos']+1),   # change to 1-based position
-                  data['id'],
-                  data['ref'],
-                  alt,
-                  qual,
-                  filter,
-                  self.format_formatdata( data['info'], self._info, separator=";" ),
-                  self.format_formatdata( data['format'], self._format, value=False ) ]
-        
-        for s in self._samples:
-            output.append( self.format_formatdata( data[s], self._format, key=False ) )
-        
-        stream.write( "\t".join(output) + "\n" )
-
-    def _parse_header(self, stream):
-        self._lineno = 0
-        for line in stream:
-            self._lineno += 1
-            if line.startswith('##'):
-                self.parse_header( line.strip() )
-            elif line.startswith('#'):
-                self.parse_heading( line.strip() )
-                self.enter_default_format()
-            else:
-                break
-        return line
-
-    def _parse(self, line, stream):
-        if len(line.strip()) > 0:
-            d = self.parse_data( line.strip() )
-            if d: yield d
-        for line in stream:
-            self._lineno += 1
-            if self._lines and self._lineno > self._lines: raise StopIteration
-            d = self.parse_data( line.strip() )
-            if d: yield d
-
-    ######################################################################################################
-    #
-    # API follows
-    #
-    ######################################################################################################
-
-    def getsamples(self):
-        """ List of samples in VCF file """
-        return self._samples
-
-    def setsamples(self,samples):
-        """ List of samples in VCF file """
-        self._samples = samples
-
-    def getheader(self):
-        """ List of header key-value pairs (strings) """
-        return self._header
-
-    def setheader(self,header):
-        """ List of header key-value pairs (strings) """
-        self._header = header
-
-    def getinfo(self):
-        """ Dictionary of ##INFO tags, as VCF.FORMAT values """
-        return self._info
-
-    def setinfo(self,info):
-        """ Dictionary of ##INFO tags, as VCF.FORMAT values """
-        self._info = info
-
-    def getformat(self):
-        """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
-        return self._format
-
-    def setformat(self,format):
-        """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
-        self._format = format
-
-    def getfilter(self):
-        """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
-        return self._filter
-
-    def setfilter(self,filter):
-        """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
-        self._filter = filter
-
-    def setversion(self, version):
-        if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
-        self._version = version
-
-    def setregions(self, regions):
-        self._regions = regions
-
-    def setreference(self, ref):
-        """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
-        self._reference = ref
-
-    def ignoreerror(self, errorstring):
-        try:             self._ignored_errors.add(self.__dict__[errorstring])
-        except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
-
-    def warnerror(self, errorstring):
-        try:             self._warn_errors.add(self.__dict__[errorstring])
-        except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
-
-    def parse(self, stream):
-        """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
-        last_line = self._parse_header(stream)
-        # now return a generator that does the actual work.  In this way the pre-processing is done
-        # before the first piece of data is yielded
-        return self._parse(last_line, stream)
-
-    def write(self, stream, datagenerator):
-        """ Writes a VCF file to a stream, using a data generator (or list) """
-        self.write_header(stream)
-        self.write_heading(stream)
-        for data in datagenerator: self.write_data(stream,data)
-
-    def writeheader(self, stream):
-        """ Writes a VCF header """
-        self.write_header(stream)
-        self.write_heading(stream)
-
-    def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):
-        """ Utility function: compares two calls for equality """
-        # a variant should always be assigned to a unique position, one base before
-        # the leftmost position of the alignment gap.  If this rule is implemented
-        # correctly, the two positions must be equal for the calls to be identical.
-        if pos1 != pos2: return False
-        # from both calls, trim rightmost bases when identical.  Do this safely, i.e.
-        # only when the reference bases are not Ns
-        while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:
-            ref1 = ref1[:-1]
-            alt1 = alt1[:-1]
-        while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
-            ref2 = ref2[:-1]
-            alt2 = alt2[:-1]
-        # now, the alternative alleles must be identical
-        return alt1 == alt2
-
-###########################################################################################################
-###########################################################################################################
-## API functions added by Andreas
-###########################################################################################################
-
-    def connect( self, filename ):
-        '''connect to tabix file.'''
-        self.tabixfile = pysam.Tabixfile( filename )
-        self._parse_header(self.tabixfile.header)
-        
-    def fetch(self,
-              reference = None,
-              start = None, 
-              end = None, 
-              region = None ):
-        """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
-
-        iter = self.tabixfile.fetch( reference, start, end, region, parser = pysam.asVCF() )
-        for x in iter:
-            yield VCFRecord( x, self )
-
-    def validate( self, record ):
-        '''validate vcf record.
-
-        returns a validated record.
-        '''
-
-        chrom, pos = record.chrom, record.pos
-
-        # check reference
-        ref = record.ref
-        if ref == ".":
-            self.error(str(record),self.MISSING_REF)
-            if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
-            else:                   ref = ""
-        else:
-            for c in ref:
-                if c not in "ACGTN": self.error(str(record),self.UNKNOWN_CHAR_IN_REF)
-                if "N" in ref: ref = get_sequence(chrom,
-                                                  pos,
-                                                  pos+len(ref),
-                                                  self._reference)
-
-        # make sure reference is sane
-        if self._reference:
-            left = max(0,self.pos-100)
-            faref_leftflank = get_sequence(chrom,left,self.pos+len(ref),self._reference)
-            faref = faref_leftflank[pos-left:]
-            if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
-            ref = faref
-            
-        # check: format fields are defined
-        for f in record.format:
-            if f not in self._format: self.error(str(record),self.FORMAT_NOT_DEFINED, f)
-            
-        # check: all filters are defined
-        for f in record.filter:
-            if f not in self._filter: self.error(str(record),self.FILTER_NOT_DEFINED, f)
-
-        # convert v3.3 alleles
-        if self._version == 33:
-            if len(ref) != 1: self.error(line,self.V33_BAD_REF)
-            newalts = []
-            have_deletions = False
-            for a in alt:
-                if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
-                elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
-                elif a.startswith('D'): # allow D<seq> and D<num>
-                    have_deletions = True
-                    try:
-                        l = int(a[1:])          # throws ValueError if sequence
-                        if len(ref) < l:        # add to reference if necessary
-                            addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
-                            ref += addns
-                            for i,na in enumerate(newalts): newalts[i] = na+addns
-                        a = ref[l:]             # new deletion, deleting pos...pos+l
-                    except ValueError:
-                        s = a[1:]
-                        if len(ref) < len(s):   # add Ns to reference if necessary
-                            addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
-                            if not s.endswith(addns) and addns != 'N'*len(addns):
-                                self.error(line,self.V33_UNMATCHED_DELETION,
-                                           "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
-                            ref += addns
-                            for i,na in enumerate(newalts): newalts[i] = na+addns
-                        a = ref[len(s):]        # new deletion, deleting from pos
-                else:
-                    self.error(line,self.V33_BAD_ALLELE)
-                newalts.append(a)
-            alt = newalts
-            # deletion alleles exist, add dummy 1st reference allele, and account for leading base
-            if have_deletions:
-                if pos == 0:
-                    # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
-                    addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
-                    ref += addn
-                    alt = [allele+addn for allele in alt]
-                else:
-                    addn = get_sequence(chrom,pos-1,pos,self._reference)
-                    ref = addn + ref
-                    alt = [addn + allele for allele in alt]
-                    pos -= 1
-        else:
-            # format v4.0 -- just check for nucleotides
-            for allele in alt:
-                if not alleleRegEx.match(allele):
-                    self.error(line,self.V40_BAD_ALLELE,allele)
-                    
-
-        # check for leading nucleotide in indel calls
-        for allele in alt:
-            if len(allele) != len(ref):
-                if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
-                if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
-                    self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
-
-        # trim trailing bases in alleles
-        for i in range(1,min(len(ref),min(map(len,alt)))):
-            if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
-                break
-            ref, alt = ref[:-1], [allele[:-1] for allele in alt]
-
-        # left-align alleles, if a reference is available
-        if self._leftalign and self._reference:
-            while left < pos:
-                movable = True
-                for allele in alt:
-                    if len(allele) > len(ref):
-                        longest, shortest = allele, ref
-                    else:
-                        longest, shortest = ref, allele
-                    if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
-                        movable = False
-                    if longest[-1].upper() != longest[len(shortest)-1].upper():
-                        movable = False
-                if not movable:
-                    break
-                ref = ref[:-1]
-                alt = [allele[:-1] for allele in alt]
-                if min(len(allele) for allele in alt) == 0 or len(ref) == 0:
-                    ref = faref_leftflank[pos-left-1] + ref
-                    alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
-                    pos -= 1
-
-
-
-
index ec0439f17290876217c610355072aa4f4d074efa..8454f8e4b0739581a463484d1799ba2b2a43a1ad 100644 (file)
@@ -86,19 +86,31 @@ class SamtoolsDispatcher(object):
 #
 # import is a python reserved word.
 SAMTOOLS_DISPATCH = { 
+    # samtools 'documented' commands
     "view" : ( "view", None ),
     "sort" : ( "sort", None),
-    "samimport": ( "import", None),
-    "pileup" : ( "pileup", ( (("-c",), Pileup.iterate ), ), ),
+    "mpileup" : ( "mpileup", None),
+    "depth" : ("depth", None),
     "faidx" : ("faidx", None),
     "tview" : ("tview", None),
     "index" : ("index", None),
+    "idxstats" : ("idxstats", None),
     "fixmate" : ("fixmate", None),
-    "glfview" : ("glfview", None),
     "flagstat" : ("flagstat", None),
     "calmd" : ("calmd", None),
     "merge" : ("merge", None),  
-    "rmdup" : ("rmdup", None) }
+    "rmdup" : ("rmdup", None),
+    "reheader" : ("reheader", None),
+    "cat" : ("cat", None),
+    "targetcut" : ("targetcut", None),
+    "phase" : ("phase", None),
+    # others
+    "samimport": ( "import", None),
+    "bam2fq" : ("bam2fq", None),
+    # obsolete
+    # "pileup" : ( "pileup", ( (("-c",), Pileup.iterate ), ), ),
+
+ }
 
 # instantiate samtools commands as python functions
 for key, options in SAMTOOLS_DISPATCH.iteritems():
index df3763802d7ee5742a5379acbfc43b4d052ddf6d..4ec74e3693c86aea8cc7052db6ace9a770c6bb6d 100644 (file)
@@ -126,7 +126,8 @@ cdef extern from "bam.h":
      char *text
 
   ctypedef struct bam_index_t:
-      pass
+      int32_t n
+      uint64_t n_no_coor
 
   ctypedef struct bam_plbuf_t:
       pass
@@ -203,6 +204,7 @@ cdef extern from "bam.h":
   void bam_plp_set_mask(bam_plp_t iter, int mask)
   void bam_plp_reset(bam_plp_t iter)
   void bam_plp_destroy(bam_plp_t iter)
+  void bam_plp_set_maxcnt(bam_plp_t iter, int maxcnt)
 
   ##################################################
 
@@ -263,67 +265,67 @@ cdef extern from "sam.h":
   int bam_cap_mapQ(bam1_t *b, char *ref, int thres)
 
 
-cdef extern from "glf.h":
-   ctypedef struct glf1_t:
-      pass
-
-cdef extern from "bam_maqcns.h":
-
-  ctypedef struct bam_maqcns_t:
-     float het_rate, theta
-     int n_hap, cap_mapQ, errmod, min_baseQ
-     float eta, q_r
-     double *fk, *coef
-     double *lhet
-     void *aux
-
-  glf1_t *bam_maqcns_glfgen(int n, 
-                            bam_pileup1_t *pl, 
-                            uint8_t ref_base, 
-                            bam_maqcns_t *bm)
-
-  ctypedef struct bam_maqindel_opt_t:
-      int q_indel
-      float r_indel
-      float r_snp
-      int mm_penalty, indel_err, ambi_thres
+#cdef extern from "glf.h":
+#   ctypedef struct glf1_t:
+#      pass
+
+#cdef extern from "bam_maqcns.h":
+#
+#  ctypedef struct bam_maqcns_t:
+#     float het_rate, theta
+#     int n_hap, cap_mapQ, errmod, min_baseQ
+#     float eta, q_r
+#     double *fk, *coef
+#     double *lhet
+#     void *aux
+
+#  glf1_t *bam_maqcns_glfgen(int n, 
+#                            bam_pileup1_t *pl, 
+#                            uint8_t ref_base, 
+#                            bam_maqcns_t *bm)
+
+#  ctypedef struct bam_maqindel_opt_t:
+#      int q_indel
+#      float r_indel
+#      float r_snp
+#      int mm_penalty, indel_err, ambi_thres
      
-  uint32_t bam_maqcns_call(int n, bam_pileup1_t *pl, bam_maqcns_t *bm)
-  bam_maqcns_t * bam_maqcns_init()
-  void bam_maqcns_destroy(bam_maqcns_t *bm)
-  void bam_maqcns_prepare(bam_maqcns_t *bm)
+#  uint32_t bam_maqcns_call(int n, bam_pileup1_t *pl, bam_maqcns_t *bm)
+#  bam_maqcns_t * bam_maqcns_init()
+#  void bam_maqcns_destroy(bam_maqcns_t *bm)
+#  void bam_maqcns_prepare(bam_maqcns_t *bm)
   
-  uint32_t glf2cns(glf1_t *g, int q_r)
-
-  int BAM_ERRMOD_MAQ2
-  int BAM_ERRMOD_MAQ
-  int BAM_ERRMOD_SOAP
-
-  ctypedef struct bam_maqindel_ret_t: 
-    int indel1
-    int indel2        
-    int cnt1
-    int cnt2
-    int cnt_anti
-    int cnt_ref
-    int cnt_ambi
-    char *s[2]
-    int gt
-    int gl[2]
-    int q_cns
-    int q_ref
+#  uint32_t glf2cns(glf1_t *g, int q_r)
+
+#  int BAM_ERRMOD_MAQ2
+#  int BAM_ERRMOD_MAQ
+#  int BAM_ERRMOD_SOAP
+
+#  ctypedef struct bam_maqindel_ret_t: 
+#    int indel1
+#    int indel2        
+#    int cnt1
+#    int cnt2
+#    int cnt_anti
+#    int cnt_ref
+#    int cnt_ambi
+#    char *s[2]
+#    int gt
+#    int gl[2]
+#    int q_cns
+#    int q_ref
     
-  void bam_maqindel_ret_destroy( bam_maqindel_ret_t * )
+#  void bam_maqindel_ret_destroy( bam_maqindel_ret_t * )
 
-  bam_maqindel_opt_t *bam_maqindel_opt_init()
+#  bam_maqindel_opt_t *bam_maqindel_opt_init()
 
-  bam_maqindel_ret_t * bam_maqindel(int n, 
-                    int pos, 
-                    bam_maqindel_opt_t * mi, 
-                    bam_pileup1_t * pl, 
-                    char *ref,
-                    int _n_types, 
-                    int * _types )
+#  bam_maqindel_ret_t * bam_maqindel(int n, 
+#                   int pos, 
+#                   bam_maqindel_opt_t * mi, 
+#                   bam_pileup1_t * pl, 
+#                   char *ref,
+#                   int _n_types, 
+#                   int * _types )
                                                                
 
 cdef extern from "faidx.h":
@@ -375,9 +377,13 @@ cdef extern from "pysam_util.h":
 
     void pysam_set_stderr( FILE * file )
 
-    uint32_t pysam_glf_depth( glf1_t * g )
+    # return mapped/unmapped reads on tid
+    uint32_t pysam_get_mapped( bam_index_t *idx, int tid )
+    uint32_t pysam_get_unmapped( bam_index_t *idx, int tid )
+
+#    uint32_t pysam_glf_depth( glf1_t * g )
 
-    void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c )
+#    void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c )
 
 # need to declare all C fields and methods here
 cdef class AlignedRead:
@@ -393,6 +399,8 @@ cdef class Samfile:
     cdef bam_index_t *index
     # true if file is a bam file
     cdef int isbam
+    # true if not a file but a stream
+    cdef int isstream
     # true if file is not on the local filesystem
     cdef int isremote
     # current read within iteration
@@ -400,6 +408,9 @@ cdef class Samfile:
     # file opening mode
     cdef char * mode
 
+    # beginning of read section
+    cdef int64_t start_offset 
+
     cdef bam_header_t * _buildHeader( self, new_header )
     cdef bam1_t * getCurrent( self )
     cdef int cnext(self)
@@ -409,3 +420,17 @@ cdef class Samfile:
 
     cdef char * _getrname( self, int tid )
 
+cdef class IteratorRow:
+    pass
+
+cdef class IteratorRowAll(IteratorRow):
+    cdef bam1_t * b
+    cdef samfile_t * fp
+    # true if samfile belongs to this object
+    cdef int owns_samfile
+
+    cdef bam1_t * getCurrent( self )
+
+    cdef int cnext(self)
+
+
index 471a445bed09a53bb137f9f2023ef56879d5b5fc..ddd599889b4525548417a43246de4c408d8faaea 100644 (file)
@@ -413,7 +413,8 @@ cdef int mate_callback( bam1_t *alignment, void *f):
 
 
 cdef class Samfile:
-    '''*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None)*
+    '''*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None,
+         add_sq_text = False )*
               
     A :term:`SAM`/:term:`BAM` formatted file. The file is automatically opened.
     
@@ -427,11 +428,11 @@ cdef class Samfile:
 
         f = pysam.Samfile('ex1.bam','rb')
 
-    If mode is not specified, we will try to auto-detect in the order 'r', 'rb', thus both the following
+    If mode is not specified, we will try to auto-detect in the order 'rb', 'r', thus both the following
     should work::
 
         f1 = pysam.Samfile('ex1.bam' )
-        f2 = pysam.Samfile('ex1.bam' )
+        f2 = pysam.Samfile('ex1.sam' )
 
     If an index for a BAM file exists (.bai), it will be opened automatically. Without an index random
     access to reads via :meth:`fetch` and :meth:`pileup` is disabled.
@@ -449,6 +450,8 @@ cdef class Samfile:
         3. If *text* is given, new header text is copied from raw text.
 
         4. The names (*referencenames*) and lengths (*referencelengths*) are supplied directly as lists. 
+           By default, 'SQ' and 'LN' tags will be added to the header text. This option can be
+           changed by unsetting the flag *add_sq_text*. 
 
     '''
 
@@ -456,6 +459,7 @@ cdef class Samfile:
         self.samfile = NULL
         self._filename = NULL
         self.isbam = False
+        self.isstream = False
         self._open( *args, **kwargs )
 
         # allocate memory for iterator
@@ -478,6 +482,7 @@ cdef class Samfile:
                text = None,
                header = None,
                port = None,
+               add_sq_text = True,
               ):
         '''open a sam/bam file.
 
@@ -488,20 +493,21 @@ cdef class Samfile:
         # read mode autodetection
         if mode is None:
             try:
-                self._open(filename, 'r', template=template,
+                self._open(filename, 'rb', template=template,
                            referencenames=referencenames,
                            referencelengths=referencelengths,
                            text=text, header=header, port=port)
                 return
             except ValueError, msg:
                 pass
-            self._open(filename, 'rb', template=template,
+            
+            self._open(filename, 'r', template=template,
                        referencenames=referencenames,
                        referencelengths=referencelengths,
                        text=text, header=header, port=port)
             return
 
-        assert mode in ( "r","w","rb","wb", "wh", "wbu" ), "invalid file opening mode `%s`" % mode
+        assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), "invalid file opening mode `%s`" % mode
         assert filename != NULL
 
         # close a previously opened file
@@ -513,6 +519,7 @@ cdef class Samfile:
         
         if self._filename != NULL: free(self._filename )
         self._filename = strdup( filename )
+        self.isstream = strcmp( filename, "-" ) == 0
 
         self.isbam = len(mode) > 1 and mode[1] == 'b'
 
@@ -551,6 +558,13 @@ cdef class Samfile:
                     header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))
                     strncpy( header_to_write.target_name[x], name, len(name) )
 
+                # Optionally, if there is no text, add a SAM compatible header to output
+                # file.
+                if text is None and add_sq_text:
+                    text = ''
+                    for x from 0 <= x < header_to_write.n_targets:
+                        text += "@SQ\tSN:%s\tLN:%s\n" % (referencenames[x], referencelengths[x] )
+
                 if text != None:
                     # copy without \0
                     ctext = text
@@ -587,8 +601,9 @@ cdef class Samfile:
                 raise ValueError( "file does not have valid header (mode='%s') - is it SAM/BAM format?" % mode )
             
             #disabled for autodetection to work
-            if self.samfile.header.n_targets == 0:
-                raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode)
+            # needs to be disabled so that reading from sam-files without headers works
+            #if self.samfile.header.n_targets == 0:
+            #    raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode)
 
         if self.samfile == NULL:
             raise IOError("could not open file `%s`" % filename )
@@ -608,7 +623,10 @@ cdef class Samfile:
                 self.index = bam_index_load(filename)
                 if self.index == NULL:
                     raise IOError("error while opening index `%s` " % filename )
-                                    
+
+            if not self.isstream:
+                self.start_offset = bam_tell( self.samfile.x.bam )
+
     def gettid( self, reference ):
         '''
         convert :term:`reference` name into numerical :term:`tid`
@@ -688,6 +706,10 @@ cdef class Samfile:
 
         return 1, rtid, rstart, rend
     
+    def reset( self ):
+        '''reset file position to beginning of read section.'''
+        return self.seek( self.start_offset, 0 )
+
     def seek( self, uint64_t offset, int where = 0):
         '''
         move file pointer to position *offset*, see :meth:`pysam.Samfile.tell`.
@@ -697,6 +719,9 @@ cdef class Samfile:
             raise ValueError( "I/O operation on closed file" )
         if not self.isbam:
             raise NotImplementedError("seek only available in bam files")
+        if self.isstream:
+            raise OSError("seek no available in streams")
+        
         return bam_seek( self.samfile.x.bam, offset, where )
 
     def tell( self ):
@@ -722,10 +747,11 @@ cdef class Samfile:
         :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can 
         be supplied.
 
-        Without *reference* or *region* all reads will be fetched. The reads will be returned
+        Without *reference* or *region* all mapped reads will be fetched. The reads will be returned
         ordered by reference sequence, which will not necessarily be the order within the file.
+
         If *until_eof* is given, all reads from the current file position will be returned
-        *in order as they are within the file*.  
+        in order as they are within the file. Using this option will also fetch unmapped reads. 
         
         If only *reference* is set, all reads aligned to *reference* will be fetched.
 
@@ -744,6 +770,9 @@ cdef class Samfile:
 
         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
         
+        if self.isstream: reopen = False
+        else: reopen = True
+
         if self.isbam:
             if not until_eof and not self._hasIndex() and not self.isremote: 
                 raise ValueError( "fetch called on bamfile without index" )
@@ -760,24 +789,26 @@ cdef class Samfile:
                                  fetch_callback )
             else:
                 if has_coord:
-                    return IteratorRowRegion( self, rtid, rstart, rend )
+                    return IteratorRowRegion( self, rtid, rstart, rend, reopen=reopen )
                 else:
                     if until_eof:
-                        return IteratorRowAll( self )
+                        return IteratorRowAll( self, reopen=reopen )
                     else:
-                        return IteratorRowAllRefs(self)
+                        # AH: check - reason why no reopen for AllRefs?
+                        return IteratorRowAllRefs(self ) # , reopen=reopen )
         else:   
             # check if header is present - otherwise sam_read1 aborts
             # this happens if a bamfile is opened with mode 'r'
+            if has_coord:
+                raise ValueError ("fetching by region is not available for sam files" )
+
             if self.samfile.header.n_targets == 0:
                 raise ValueError( "fetch called for samfile without header")
-                  
-            if region != None:
-                raise ValueError ("fetch for a region is not available for sam files" )
+
             if callback:
                 raise NotImplementedError( "callback not implemented yet" )
             else:
-                return IteratorRowAll( self )
+                return IteratorRowAll( self, reopen=reopen )
 
     def mate( self, 
               AlignedRead read ):
@@ -905,15 +936,14 @@ cdef class Samfile:
          mask
            Skip all reads with bits set in mask.
 
+         max_depth
+           Maximum read depth permitted. The default limit is *8000*.
 
         .. note::
 
             *all* reads which overlap the region are returned. The first base returned will be the 
             first base of the first read *not* necessarily the first base of the region used in the query.
 
-            The maximum number of reads considered for pileup is *8000*. This limit is set by
-            :term:`csamtools`.
-
         '''
         cdef int rtid, rstart, rend, has_coord
         cdef bam_plbuf_t *buf
@@ -1021,6 +1051,33 @@ cdef class Samfile:
                 t.append( self.samfile.header.target_len[x] )
             return tuple(t)
 
+    property mapped:
+        """total number of mapped reads in file.
+        """
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
+            
+            cdef int tid
+            cdef uint32_t total = 0
+            for tid from 0 <= tid < self.samfile.header.n_targets:
+                total += pysam_get_mapped( self.index, tid )
+            return total
+
+    property unmapped:
+        """total number of unmapped reads in file.
+        """
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            if not self.isbam: raise AttributeError( "Samfile.unmapped only available in bam files" )
+            cdef int tid
+            cdef uint32_t total = 0
+            for tid from 0 <= tid < self.samfile.header.n_targets:
+                total += pysam_get_unmapped( self.index, tid )
+            # get unmapped reads without coordinates
+            total += pysam_get_unmapped( self.index, -1 )
+            return total
+
     property text:
         '''full contents of the :term:`sam file` header as a string.'''
         def __get__(self):
@@ -1158,6 +1215,8 @@ cdef class Samfile:
     ###############################################################
     def __iter__(self):
         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+        if not self.isbam and self.samfile.header.n_targets == 0:
+                raise NotImplementedError( "can not iterate over samfile without header")
         return self 
 
     cdef bam1_t * getCurrent( self ):
@@ -1299,10 +1358,10 @@ cdef class IteratorRowAll(IteratorRow):
     to not re-open *samfile*.
     """
 
-    cdef bam1_t * b
-    cdef samfile_t * fp
-    # true if samfile belongs to this object
-    cdef int owns_samfile
+    cdef bam1_t * b
+    cdef samfile_t * fp
+    # true if samfile belongs to this object
+    cdef int owns_samfile
 
     def __cinit__(self, Samfile samfile, int reopen = True ):
 
@@ -1579,8 +1638,8 @@ cdef class IteratorColumn:
        A :class:`FastaFile` object
     mask
        Skip all reads with bits set in mask.
-       
-    
+    max_depth
+       maximum read depth. The default is 8000.
     '''
 
     # result of the last plbuf_push
@@ -1595,12 +1654,14 @@ cdef class IteratorColumn:
     cdef Samfile samfile
     cdef Fastafile fastafile
     cdef stepper
+    cdef int max_depth
 
     def __cinit__( self, Samfile samfile, **kwargs ):
         self.samfile = samfile
         self.mask = kwargs.get("mask", BAM_DEF_MASK )
         self.fastafile = kwargs.get( "fastafile", None )
         self.stepper = kwargs.get( "stepper", None )
+        self.max_depth = kwargs.get( "max_depth", 8000 )
         self.iterdata.seq = NULL
         self.tid = 0
         self.pos = 0
@@ -1608,6 +1669,7 @@ cdef class IteratorColumn:
         self.plp = NULL
         self.pileup_iter = <bam_plp_t>NULL
 
+
     def __iter__(self):
         return self 
 
@@ -1677,6 +1739,9 @@ cdef class IteratorColumn:
         else:
             raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper)
 
+        if self.max_depth:
+            bam_plp_set_maxcnt( self.pileup_iter, self.max_depth )
+
         bam_plp_set_mask( self.pileup_iter, self.mask )
 
     cdef reset( self, tid, start, end ):
@@ -2200,6 +2265,9 @@ cdef class AlignedRead:
 
             read.tags = read.tags + [("RG",0)]
 
+
+        This method will happily write the same tag
+        multiple times.
         """
         def __get__(self):
             cdef char * ctag
@@ -2209,7 +2277,7 @@ cdef class AlignedRead:
             cdef char auxtype
             
             src = self._delegate
-            if src.l_aux == 0: return None
+            if src.l_aux == 0: return []
             
             s = bam1_aux( src )
             result = []
@@ -2381,7 +2449,7 @@ cdef class AlignedRead:
         '''length of the read (read only). Returns 0 if not given.'''
         def __get__(self): return self._delegate.core.l_qseq
     property aend:
-        '''aligned end position of the read (read only).  Returns
+        '''aligned end position of the read on the reference genome.  Returns
         None if not available.'''
         def __get__(self):
             cdef bam1_t * src
@@ -2390,7 +2458,7 @@ cdef class AlignedRead:
                 return None
             return bam_calend(&src.core, bam1_cigar(src))
     property alen:
-        '''aligned length of the read (read only).  Returns None if
+        '''aligned length of the read on the reference genome.  Returns None if
         not available.'''
         def __get__(self):
             cdef bam1_t * src
@@ -2406,14 +2474,30 @@ cdef class AlignedRead:
         def __get__(self): return self._delegate.core.qual
         def __set__(self, qual): self._delegate.core.qual = qual
     property mrnm:
+        """the :term:`reference` id of the mate 
+        deprecated, use RNEXT instead.
+        """     
+        def __get__(self): return self._delegate.core.mtid
+        def __set__(self, mtid): self._delegate.core.mtid = mtid
+    property rnext:
         """the :term:`reference` id of the mate """     
         def __get__(self): return self._delegate.core.mtid
         def __set__(self, mtid): self._delegate.core.mtid = mtid
     property mpos: 
+        """the position of the mate
+        deprecated, use PNEXT instead."""
+        def __get__(self): return self._delegate.core.mpos
+        def __set__(self, mpos): self._delegate.core.mpos = mpos
+    property pnext: 
         """the position of the mate"""
         def __get__(self): return self._delegate.core.mpos
         def __set__(self, mpos): self._delegate.core.mpos = mpos
     property isize: 
+        """the insert size
+        deprecated: use tlen instead"""
+        def __get__(self): return self._delegate.core.isize
+        def __set__(self, isize): self._delegate.core.isize = isize
+    property tlen: 
         """the insert size"""
         def __get__(self): return self._delegate.core.isize
         def __set__(self, isize): self._delegate.core.isize = isize
@@ -2509,8 +2593,10 @@ cdef class AlignedRead:
                     pos += l
 
             return result
+
     def overlap( self, uint32_t start, uint32_t end ):
-        """return number of bases on reference overlapping *start* and *end*
+        """return number of aligned bases of read overlapping the interval *start* and *end*
+        on the reference sequence.
         """
         cdef uint32_t k, i, pos, overlap
         cdef int op, o
@@ -2739,7 +2825,7 @@ def _samtools_dispatch( method,
     '''call ``method`` in samtools providing arguments in args.
     
     .. note:: 
-       This method redirects stdout and stderr to capture it 
+       This method redirects stdout and (optionally) stderr to capture it 
        from samtools. If for some reason stdout/stderr disappears
        the reason might be in this method.
 
@@ -2756,8 +2842,8 @@ def _samtools_dispatch( method,
     '''
 
     # note that debugging this module can be a problem
-    # as stdout/stderr will not appear
-
+    # as stdout/stderr will not appear on the terminal
+    
     # some special cases
     if method == "index":
         if not os.path.exists( args[0] ):
@@ -2781,7 +2867,6 @@ def _samtools_dispatch( method,
             if "-o" in args: raise ValueError("option -o is forbidden in samtools view")
             args = ( "-o", stdout_f ) + args
 
-
     # do the function call to samtools
     cdef char ** cargs
     cdef int i, n, retval
@@ -2792,6 +2877,7 @@ def _samtools_dispatch( method,
     cargs[0] = "samtools"
     cargs[1] = method
     for i from 0 <= i < n: cargs[i+2] = args[i]
+
     retval = pysam_dispatch(n+2, cargs)
     free( cargs )
 
@@ -2870,500 +2956,500 @@ cdef class SNPCall:
                     self.coverage ) ) )
 
 
-cdef class SNPCallerBase:
-    '''Base class for SNP callers.
-
-    *min_baseQ*
-       minimum base quality (possibly capped by BAQ)
-    *capQ_threshold*
-       coefficient for adjusting mapQ of poor mappings
-    *theta*
-       theta in maq consensus calling model
-    *n_haplotypes*
-       number of haplotypes in the sample
-    *het_rate*
-       prior of a difference between two haplotypes
-    '''
-
-    cdef bam_maqcns_t * c
-    cdef IteratorColumn iter
-
-    def __cinit__(self, 
-                  IteratorColumn iterator_column, 
-                  **kwargs ):
-
-        self.iter = iterator_column
-        self.c =  bam_maqcns_init()
-
-        # set the default parameterization according to
-        # samtools
-
-        # new default mode for samtools >0.1.10
-        self.c.errmod = kwargs.get( "errmod", BAM_ERRMOD_MAQ2 )
-
-        self.c.min_baseQ = kwargs.get( "min_baseQ", 13 )
-        # self.c.capQ_thres = kwargs.get( "capQ_threshold", 60 )
-        self.c.n_hap = kwargs.get( "n_haplotypes", 2 )
-        self.c.het_rate = kwargs.get( "het_rate", 0.001 )
-        self.c.theta = kwargs.get( "theta", 0.83 )
-
-        if self.c.errmod != BAM_ERRMOD_MAQ2:
-            self.c.theta += 0.02
-
-        # call prepare AFTER setting parameters
-        bam_maqcns_prepare( self.c )
-
-    def __dealloc__(self):
-        bam_maqcns_destroy( self.c )
-
-    cdef __dump( self, glf1_t * g, uint32_t cns, int rb ):
-        '''debugging output.'''
-
-        pysam_dump_glf( g, self.c );
-        print ""
-        for x in range(self.iter.n_plp):
-            print "--> read %i %s %i" % (x, 
-                                         bam1_qname(self.iter.plp[x].b),
-                                         self.iter.plp[x].qpos,
-                                         )
-
-        print "pos=%i, cns=%i, q_r = %f, depth=%i, n=%i, rb=%i, cns-cq=%i %i %i %i" \
-            % (self.iter.pos, 
-               cns, 
-               self.c.q_r,
-               self.iter.n_plp,
-               self.iter.n_plp,
-               rb,
-               cns >> 8 & 0xff,
-               cns >> 16 & 0xff,
-               cns & 0xff,
-               cns >> 28,
-               )
-
-        printf("-------------------------------------\n");
-        sys.stdout.flush()
-
-cdef class IteratorSNPCalls( SNPCallerBase ):
-    """*(IteratorColumn iterator)*
-
-    call SNPs within a region.
-
-    *iterator* is a pileup iterator. SNPs will be called
-    on all positions returned by this iterator.
-
-    This caller is fast if SNPs are called over large continuous
-    regions. It is slow, if instantiated frequently and in random
-    order as the sequence will have to be reloaded.
-
-    """
+cdef class SNPCallerBase:
+    '''Base class for SNP callers.
+
+    *min_baseQ*
+       minimum base quality (possibly capped by BAQ)
+    *capQ_threshold*
+       coefficient for adjusting mapQ of poor mappings
+    *theta*
+       theta in maq consensus calling model
+    *n_haplotypes*
+       number of haplotypes in the sample
+    *het_rate*
+       prior of a difference between two haplotypes
+    '''
+
+    cdef bam_maqcns_t * c
+    cdef IteratorColumn iter
+
+    def __cinit__(self, 
+                  IteratorColumn iterator_column, 
+                  **kwargs ):
+
+        self.iter = iterator_column
+        self.c =  bam_maqcns_init()
+
+        # set the default parameterization according to
+        # samtools
+
+        # new default mode for samtools >0.1.10
+        self.c.errmod = kwargs.get( "errmod", BAM_ERRMOD_MAQ2 )
+
+        self.c.min_baseQ = kwargs.get( "min_baseQ", 13 )
+        # self.c.capQ_thres = kwargs.get( "capQ_threshold", 60 )
+        self.c.n_hap = kwargs.get( "n_haplotypes", 2 )
+        self.c.het_rate = kwargs.get( "het_rate", 0.001 )
+        self.c.theta = kwargs.get( "theta", 0.83 )
+
+        if self.c.errmod != BAM_ERRMOD_MAQ2:
+            self.c.theta += 0.02
+
+        # call prepare AFTER setting parameters
+        bam_maqcns_prepare( self.c )
+
+    def __dealloc__(self):
+        bam_maqcns_destroy( self.c )
+
+    cdef __dump( self, glf1_t * g, uint32_t cns, int rb ):
+        '''debugging output.'''
+
+        pysam_dump_glf( g, self.c );
+        print ""
+        for x in range(self.iter.n_plp):
+            print "--> read %i %s %i" % (x, 
+                                         bam1_qname(self.iter.plp[x].b),
+                                         self.iter.plp[x].qpos,
+                                         )
+
+        print "pos=%i, cns=%i, q_r = %f, depth=%i, n=%i, rb=%i, cns-cq=%i %i %i %i" \
+            % (self.iter.pos, 
+               cns, 
+               self.c.q_r,
+               self.iter.n_plp,
+               self.iter.n_plp,
+               rb,
+               cns >> 8 & 0xff,
+               cns >> 16 & 0xff,
+               cns & 0xff,
+               cns >> 28,
+               )
+
+        printf("-------------------------------------\n");
+        sys.stdout.flush()
+
+cdef class IteratorSNPCalls( SNPCallerBase ):
+    """*(IteratorColumn iterator)*
+
+    call SNPs within a region.
+
+    *iterator* is a pileup iterator. SNPs will be called
+    on all positions returned by this iterator.
+
+    This caller is fast if SNPs are called over large continuous
+    regions. It is slow, if instantiated frequently and in random
+    order as the sequence will have to be reloaded.
+
+    """
     
-    def __cinit__(self, 
-                  IteratorColumn iterator_column,
-                  **kwargs ):
+    def __cinit__(self, 
+                  IteratorColumn iterator_column,
+                  **kwargs ):
 
-        assert self.iter.hasReference(), "IteratorSNPCalls requires an pileup iterator with reference sequence"
+        assert self.iter.hasReference(), "IteratorSNPCalls requires an pileup iterator with reference sequence"
 
-    def __iter__(self):
-        return self 
+    def __iter__(self):
+        return self 
 
-    def __next__(self): 
-        """python version of next().
-        """
+    def __next__(self): 
+        """python version of next().
+        """
 
-        # the following code was adapted from bam_plcmd.c:pileup_func()
-        self.iter.cnext()
+        # the following code was adapted from bam_plcmd.c:pileup_func()
+        self.iter.cnext()
 
-        if self.iter.n_plp < 0:
-            raise ValueError("error during iteration" )
+        if self.iter.n_plp < 0:
+            raise ValueError("error during iteration" )
 
-        if self.iter.plp == NULL:
-           raise StopIteration
+        if self.iter.plp == NULL:
+           raise StopIteration
 
-        cdef char * seq = self.iter.getSequence()
-        cdef int seq_len = self.iter.seq_len
+        cdef char * seq = self.iter.getSequence()
+        cdef int seq_len = self.iter.seq_len
 
-        assert seq != NULL
+        assert seq != NULL
 
-        # reference base
-        if self.iter.pos >= seq_len:
-            raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) )
+        # reference base
+        if self.iter.pos >= seq_len:
+            raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) )
 
-        cdef int rb = seq[self.iter.pos]
-        cdef uint32_t cns 
-        cdef glf1_t * g
+        cdef int rb = seq[self.iter.pos]
+        cdef uint32_t cns 
+#        cdef glf1_t * g
 
-        g = bam_maqcns_glfgen( self.iter.n_plp,
-                               self.iter.plp,
-                               bam_nt16_table[rb],
-                               self.c )
+#        g = bam_maqcns_glfgen( self.iter.n_plp,
+#                               self.iter.plp,
+#                               bam_nt16_table[rb],
+#                               self.c )
 
-        if pysam_glf_depth( g ) == 0:
-            cns = 0xfu << 28 | 0xf << 24
-        else:
-            cns = glf2cns(g, <int>(self.c.q_r + .499))
-            
-        free(g)
+#        if pysam_glf_depth( g ) == 0:
+#            cns = 0xfu << 28 | 0xf << 24
+#        else:
+#            cns = glf2cns(g, <int>(self.c.q_r + .499))
+           
+#        free(g)
             
-        cdef SNPCall call
+        cdef SNPCall call
 
-        call = SNPCall()
-        call._tid = self.iter.tid
-        call._pos = self.iter.pos
-        call._reference_base = rb
-        call._genotype = bam_nt16_rev_table[cns>>28]
-        call._consensus_quality = cns >> 8 & 0xff
-        call._snp_quality = cns & 0xff
-        call._rms_mapping_quality = cns >> 16&0xff
-        call._coverage = self.iter.n_plp
+        call = SNPCall()
+        call._tid = self.iter.tid
+        call._pos = self.iter.pos
+        call._reference_base = rb
+        call._genotype = bam_nt16_rev_table[cns>>28]
+        call._consensus_quality = cns >> 8 & 0xff
+        call._snp_quality = cns & 0xff
+        call._rms_mapping_quality = cns >> 16&0xff
+        call._coverage = self.iter.n_plp
 
-        return call 
+        return call 
 
-cdef class SNPCaller( SNPCallerBase ):
-    '''*(IteratorColumn iterator_column )*
+cdef class SNPCaller( SNPCallerBase ):
+    '''*(IteratorColumn iterator_column )*
 
-    The samtools SNP caller.
+    The samtools SNP caller.
 
-    This object will call SNPs in *samfile* against the reference
-    sequence in *fasta*.
+    This object will call SNPs in *samfile* against the reference
+    sequence in *fasta*.
 
-    This caller is fast for calling few SNPs in selected regions.
+    This caller is fast for calling few SNPs in selected regions.
 
-    It is slow, if called over large genomic regions.
-    '''
+    It is slow, if called over large genomic regions.
+    '''
 
 
-    def __cinit__(self, 
-                  IteratorColumn iterator_column, 
-                  **kwargs ):
+    def __cinit__(self, 
+                  IteratorColumn iterator_column, 
+                  **kwargs ):
 
-        pass
+        pass
 
-    def call(self, reference, int pos ): 
-        """call a snp on chromosome *reference*
-        and position *pos*.
+    def call(self, reference, int pos ): 
+        """call a snp on chromosome *reference*
+        and position *pos*.
 
-        returns a :class:`SNPCall` object.
-        """
+        returns a :class:`SNPCall` object.
+        """
 
-        cdef int tid = self.iter.samfile.gettid( reference )
+        cdef int tid = self.iter.samfile.gettid( reference )
 
-        self.iter.reset( tid, pos, pos + 1 )
+        self.iter.reset( tid, pos, pos + 1 )
 
-        while 1:
-            self.iter.cnext()
+        while 1:
+            self.iter.cnext()
             
-            if self.iter.n_plp < 0:
-                raise ValueError("error during iteration" )
+            if self.iter.n_plp < 0:
+                raise ValueError("error during iteration" )
 
-            if self.iter.plp == NULL:
-                raise ValueError( "no reads in region - no call" )
+            if self.iter.plp == NULL:
+                raise ValueError( "no reads in region - no call" )
              
-            if self.iter.pos == pos: break
-
-        cdef char * seq = self.iter.getSequence()
-        cdef int seq_len = self.iter.seq_len
-
-        assert seq != NULL
-
-        # reference base
-        if self.iter.pos >= seq_len:
-            raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) )
-
-        cdef int rb = seq[self.iter.pos]
-        cdef uint32_t cns 
-        cdef glf1_t * g
-
-        g = bam_maqcns_glfgen( self.iter.n_plp,
-                               self.iter.plp,
-                               bam_nt16_table[rb],
-                               self.c )
-
-
-        if pysam_glf_depth( g ) == 0:
-            cns = 0xfu << 28 | 0xf << 24
-        else:
-            cns = glf2cns(g, <int>(self.c.q_r + .499))
-
-        free(g)
+            if self.iter.pos == pos: break
+
+        cdef char * seq = self.iter.getSequence()
+        cdef int seq_len = self.iter.seq_len
+
+        assert seq != NULL
+
+        # reference base
+        if self.iter.pos >= seq_len:
+            raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) )
+
+        cdef int rb = seq[self.iter.pos]
+        cdef uint32_t cns 
+# #        cdef glf1_t * g
+# #
+# #        g = bam_maqcns_glfgen( self.iter.n_plp,
+# #                               self.iter.plp,
+# #                               bam_nt16_table[rb],
+# #                               self.c )
+# ##
+# #
+# #        if pysam_glf_depth( g ) == 0:
+# #            cns = 0xfu << 28 | 0xf << 24
+# #        else:
+# #            cns = glf2cns(g, <int>(self.c.q_r + .499))
+# #
+# #        free(g)
             
-        cdef SNPCall call
-
-        call = SNPCall()
-        call._tid = self.iter.tid
-        call._pos = self.iter.pos
-        call._reference_base = rb
-        call._genotype = bam_nt16_rev_table[cns>>28]
-        call._consensus_quality = cns >> 8 & 0xff
-        call._snp_quality = cns & 0xff
-        call._rms_mapping_quality = cns >> 16&0xff
-        call._coverage = self.iter.n_plp
-
-        return call 
-
-cdef class IndelCall:
-    '''the results of an indel call.'''
-    cdef int _tid
-    cdef int _pos
-    cdef int _coverage
-    cdef int _rms_mapping_quality
-    cdef bam_maqindel_ret_t * _r 
-
-    def __cinit__(self):
-        #assert r != NULL
-        #self._r = r
-        pass
-
-    property tid:
-        '''the chromosome ID as is defined in the header'''
-        def __get__(self): 
-            return self._tid
+        cdef SNPCall call
+
+        call = SNPCall()
+        call._tid = self.iter.tid
+        call._pos = self.iter.pos
+        call._reference_base = rb
+        call._genotype = bam_nt16_rev_table[cns>>28]
+        call._consensus_quality = cns >> 8 & 0xff
+        call._snp_quality = cns & 0xff
+        call._rms_mapping_quality = cns >> 16&0xff
+        call._coverage = self.iter.n_plp
+
+        return call 
+
+cdef class IndelCall:
+    '''the results of an indel call.'''
+    cdef int _tid
+    cdef int _pos
+    cdef int _coverage
+    cdef int _rms_mapping_quality
+    cdef bam_maqindel_ret_t * _r 
+
+    def __cinit__(self):
+        #assert r != NULL
+        #self._r = r
+        pass
+
+    property tid:
+        '''the chromosome ID as is defined in the header'''
+        def __get__(self): 
+            return self._tid
     
-    property pos:
-       '''nucleotide position of SNP.'''
-       def __get__(self): return self._pos
-
-    property genotype:
-       '''the genotype called.'''
-       def __get__(self): 
-           if self._r.gt == 0:
-               s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
-               return "%s/%s" % (s,s)
-           elif self._r.gt == 1:
-               s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
-               return "%s/%s" % (s,s)
-           else:
-               return "%s/%s" % (self.first_allele, self.second_allele )
-
-    property consensus_quality:
-       '''the genotype quality (Phred-scaled).'''
-       def __get__(self): return self._r.q_cns
-
-    property snp_quality:
-       '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
-       def __get__(self): return self._r.q_ref
-
-    property mapping_quality:
-       '''the root mean square (rms) of the mapping quality of all reads involved in the call.'''
-       def __get__(self): return self._rms_mapping_quality
-
-    property coverage:
-       '''coverage or read depth - the number of reads involved in the call.'''
-       def __get__(self): return self._coverage
-
-    property first_allele:
-       '''sequence of first allele.'''
-       def __get__(self): return PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
-
-    property second_allele:
-       '''sequence of second allele.'''
-       def __get__(self): return PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
-
-    property reads_first:
-       '''reads supporting first allele.'''
-       def __get__(self): return self._r.cnt1
-
-    property reads_second:
-       '''reads supporting first allele.'''
-       def __get__(self): return self._r.cnt2
-
-    property reads_diff:
-       '''reads supporting first allele.'''
-       def __get__(self): return self._r.cnt_anti
-
-    def __str__(self):
-
-        return "\t".join( map(str, (
-                    self.tid,
-                    self.pos,
-                    self.genotype,
-                    self.consensus_quality,
-                    self.snp_quality,
-                    self.mapping_quality,
-                    self.coverage,
-                    self.first_allele,
-                    self.second_allele,
-                    self.reads_first,
-                    self.reads_second,
-                    self.reads_diff ) ) )
-
-    def __dealloc__(self ):
-        bam_maqindel_ret_destroy(self._r)
-
-cdef class IndelCallerBase:
-    '''Base class for SNP callers.
-
-    *min_baseQ*
-       minimum base quality (possibly capped by BAQ)
-    *capQ_threshold*
-       coefficient for adjusting mapQ of poor mappings
-    *theta*
-       theta in maq consensus calling model
-    *n_haplotypes*
-       number of haplotypes in the sample
-    *het_rate*
-       prior of a difference between two haplotypes
-    '''
-
-    cdef bam_maqindel_opt_t * options
-    cdef IteratorColumn iter
-    cdef int cap_mapQ
-    cdef int max_depth
-
-    def __cinit__(self, 
-                  IteratorColumn iterator_column, 
-                  **kwargs ):
+#     property pos:
+#        '''nucleotide position of SNP.'''
+#        def __get__(self): return self._pos
+
+#     property genotype:
+#        '''the genotype called.'''
+#        def __get__(self): 
+#            if self._r.gt == 0:
+#                s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
+#                return "%s/%s" % (s,s)
+#            elif self._r.gt == 1:
+#                s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
+#                return "%s/%s" % (s,s)
+#            else:
+#                return "%s/%s" % (self.first_allele, self.second_allele )
+
+#     property consensus_quality:
+#        '''the genotype quality (Phred-scaled).'''
+#        def __get__(self): return self._r.q_cns
+
+#     property snp_quality:
+#        '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
+#        def __get__(self): return self._r.q_ref
+
+#     property mapping_quality:
+#        '''the root mean square (rms) of the mapping quality of all reads involved in the call.'''
+#        def __get__(self): return self._rms_mapping_quality
+
+#     property coverage:
+#        '''coverage or read depth - the number of reads involved in the call.'''
+#        def __get__(self): return self._coverage
+
+#     property first_allele:
+#        '''sequence of first allele.'''
+#        def __get__(self): return PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
+
+#     property second_allele:
+#        '''sequence of second allele.'''
+#        def __get__(self): return PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
+
+#     property reads_first:
+#        '''reads supporting first allele.'''
+#        def __get__(self): return self._r.cnt1
+
+#     property reads_second:
+#        '''reads supporting first allele.'''
+#        def __get__(self): return self._r.cnt2
+
+#     property reads_diff:
+#        '''reads supporting first allele.'''
+#        def __get__(self): return self._r.cnt_anti
+
+#     def __str__(self):
+
+#         return "\t".join( map(str, (
+#                     self.tid,
+#                     self.pos,
+#                     self.genotype,
+#                     self.consensus_quality,
+#                     self.snp_quality,
+#                     self.mapping_quality,
+#                     self.coverage,
+#                     self.first_allele,
+#                     self.second_allele,
+#                     self.reads_first,
+#                     self.reads_second,
+#                     self.reads_diff ) ) )
+
+#     def __dealloc__(self ):
+#         bam_maqindel_ret_destroy(self._r)
+
+# cdef class IndelCallerBase:
+#     '''Base class for SNP callers.
+
+#     *min_baseQ*
+#        minimum base quality (possibly capped by BAQ)
+#     *capQ_threshold*
+#        coefficient for adjusting mapQ of poor mappings
+#     *theta*
+#        theta in maq consensus calling model
+#     *n_haplotypes*
+#        number of haplotypes in the sample
+#     *het_rate*
+#        prior of a difference between two haplotypes
+#     '''
+
+#     cdef bam_maqindel_opt_t * options
+#     cdef IteratorColumn iter
+#     cdef int cap_mapQ
+#     cdef int max_depth
+
+#     def __cinit__(self, 
+#                   IteratorColumn iterator_column, 
+#                   **kwargs ):
+
+
+#         self.iter = iterator_column
+
+#         assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence"
+
+#         self.options = bam_maqindel_opt_init()
+
+#         # set the default parameterization according to
+#         # samtools
+
+#         self.options.r_indel = kwargs.get( "r_indel", 0.00015 )
+#         self.options.q_indel = kwargs.get( "q_indel", 40 )
+#         self.cap_mapQ = kwargs.get( "cap_mapQ", 60 )
+#         self.max_depth = kwargs.get( "max_depth", 1024 )
+
+#     def __dealloc__(self):
+#         free( self.options )
 
+#     def _call( self ):
 
-        self.iter = iterator_column
+#         cdef char * seq = self.iter.getSequence()
+#         cdef int seq_len = self.iter.seq_len
 
-        assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence"
-
-        self.options = bam_maqindel_opt_init()
-
-        # set the default parameterization according to
-        # samtools
-
-        self.options.r_indel = kwargs.get( "r_indel", 0.00015 )
-        self.options.q_indel = kwargs.get( "q_indel", 40 )
-        self.cap_mapQ = kwargs.get( "cap_mapQ", 60 )
-        self.max_depth = kwargs.get( "max_depth", 1024 )
-
-    def __dealloc__(self):
-        free( self.options )
+#         assert seq != NULL
 
-    def _call( self ):
+#         # reference base
+#         if self.iter.pos >= seq_len:
+#             raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) )
 
-        cdef char * seq = self.iter.getSequence()
-        cdef int seq_len = self.iter.seq_len
+#         cdef bam_maqindel_ret_t * r 
+        
+#         cdef int m = min( self.max_depth, self.iter.n_plp )
+
+#         # printf("pysam: m=%i, q_indel=%i, r_indel=%f, r_snp=%i, mm_penalty=%i, indel_err=%i, ambi_thres=%i\n",
+#         #        m, self.options.q_indel, self.options.r_indel, self.options.r_snp, self.options.mm_penalty,
+#         #        self.options.indel_err, self.options.ambi_thres );
+
+#         r = bam_maqindel(m, 
+#                          self.iter.pos, 
+#                          self.options,
+#                          self.iter.plp, 
+#                          seq,
+#                          0, 
+#                          NULL)
+        
+#         if r == NULL: return None
 
-        assert seq != NULL
+#         cdef IndelCall call
+#         call = IndelCall()
+#         call._r = r
+#         call._tid = self.iter.tid
+#         call._pos = self.iter.pos
+#         call._coverage = self.iter.n_plp
 
-        # reference base
-        if self.iter.pos >= seq_len:
-            raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) )
+#         cdef uint64_t rms_aux = 0
+#         cdef int i = 0
+#         cdef bam_pileup1_t * p
+#         cdef int tmp
 
-        cdef bam_maqindel_ret_t * r 
-        
-        cdef int m = min( self.max_depth, self.iter.n_plp )
-
-        # printf("pysam: m=%i, q_indel=%i, r_indel=%f, r_snp=%i, mm_penalty=%i, indel_err=%i, ambi_thres=%i\n",
-        #        m, self.options.q_indel, self.options.r_indel, self.options.r_snp, self.options.mm_penalty,
-        #        self.options.indel_err, self.options.ambi_thres );
-
-        r = bam_maqindel(m, 
-                         self.iter.pos, 
-                         self.options,
-                         self.iter.plp, 
-                         seq,
-                         0, 
-                         NULL)
-        
-        if r == NULL: return None
-
-        cdef IndelCall call
-        call = IndelCall()
-        call._r = r
-        call._tid = self.iter.tid
-        call._pos = self.iter.pos
-        call._coverage = self.iter.n_plp
-
-        cdef uint64_t rms_aux = 0
-        cdef int i = 0
-        cdef bam_pileup1_t * p
-        cdef int tmp
-
-        for i from 0 <= i < self.iter.n_plp:
-            p = self.iter.plp + i
-            if p.b.core.qual < self.cap_mapQ:
-                tmp = p.b.core.qual 
-            else:
-                tmp = self.cap_mapQ
-            rms_aux += tmp * tmp
+#         for i from 0 <= i < self.iter.n_plp:
+#             p = self.iter.plp + i
+#             if p.b.core.qual < self.cap_mapQ:
+#                 tmp = p.b.core.qual 
+#             else:
+#                 tmp = self.cap_mapQ
+#             rms_aux += tmp * tmp
 
-        call._rms_mapping_quality = <uint64_t>(sqrt(<double>rms_aux / self.iter.n_plp) + .499)
+        call._rms_mapping_quality = <uint64_t>(sqrt(<double>rms_aux / self.iter.n_plp) + .499)
 
-        return call 
+        return call 
 
-cdef class IndelCaller( IndelCallerBase ):
-    '''*(IteratorColumn iterator_column )*
+cdef class IndelCaller( IndelCallerBase ):
+    '''*(IteratorColumn iterator_column )*
 
-    The samtools SNP caller.
+    The samtools SNP caller.
 
-    This object will call SNPs in *samfile* against the reference
-    sequence in *fasta*.
+    This object will call SNPs in *samfile* against the reference
+    sequence in *fasta*.
 
-    This caller is fast for calling few SNPs in selected regions.
+    This caller is fast for calling few SNPs in selected regions.
 
-    It is slow, if called over large genomic regions.
-    '''
+    It is slow, if called over large genomic regions.
+    '''
 
-    def __cinit__(self, 
-                  IteratorColumn iterator_column, 
-                  **kwargs ):
+    def __cinit__(self, 
+                  IteratorColumn iterator_column, 
+                  **kwargs ):
 
-        pass
+        pass
 
-    def call(self, reference, int pos ): 
-        """call a snp on chromosome *reference*
-        and position *pos*.
+    def call(self, reference, int pos ): 
+        """call a snp on chromosome *reference*
+        and position *pos*.
 
-        returns a :class:`SNPCall` object or None, if no indel call could be made.
-        """
+        returns a :class:`SNPCall` object or None, if no indel call could be made.
+        """
 
-        cdef int tid = self.iter.samfile.gettid( reference )
+        cdef int tid = self.iter.samfile.gettid( reference )
 
-        self.iter.reset( tid, pos, pos + 1 )
+        self.iter.reset( tid, pos, pos + 1 )
 
-        while 1:
-            self.iter.cnext()
+        while 1:
+            self.iter.cnext()
             
-            if self.iter.n_plp < 0:
-                raise ValueError("error during iteration" )
+            if self.iter.n_plp < 0:
+                raise ValueError("error during iteration" )
 
-            if self.iter.plp == NULL:
-                raise ValueError( "no reads in region - no call" )
+            if self.iter.plp == NULL:
+                raise ValueError( "no reads in region - no call" )
              
-            if self.iter.pos == pos: break
+            if self.iter.pos == pos: break
 
-        return self._call()
+        return self._call()
 
-cdef class IteratorIndelCalls( IndelCallerBase ):
-    """*(IteratorColumn iterator)*
+cdef class IteratorIndelCalls( IndelCallerBase ):
+    """*(IteratorColumn iterator)*
 
-    call indels within a region.
+    call indels within a region.
 
-    *iterator* is a pileup iterator. SNPs will be called
-    on all positions returned by this iterator.
+    *iterator* is a pileup iterator. SNPs will be called
+    on all positions returned by this iterator.
 
-    This caller is fast if SNPs are called over large continuous
-    regions. It is slow, if instantiated frequently and in random
-    order as the sequence will have to be reloaded.
+    This caller is fast if SNPs are called over large continuous
+    regions. It is slow, if instantiated frequently and in random
+    order as the sequence will have to be reloaded.
 
-    """
+    """
     
-    def __cinit__(self, 
-                  IteratorColumn iterator_column,
-                  **kwargs ):
-        pass
+    def __cinit__(self, 
+                  IteratorColumn iterator_column,
+                  **kwargs ):
+        pass
 
 
-    def __iter__(self):
-        return self 
+    def __iter__(self):
+        return self 
 
-    def __next__(self): 
-        """python version of next().
-        """
+    def __next__(self): 
+        """python version of next().
+        """
 
-        # the following code was adapted from bam_plcmd.c:pileup_func()
-        self.iter.cnext()
+        # the following code was adapted from bam_plcmd.c:pileup_func()
+        self.iter.cnext()
 
-        if self.iter.n_plp < 0:
-            raise ValueError("error during iteration" )
+        if self.iter.n_plp < 0:
+            raise ValueError("error during iteration" )
 
-        if self.iter.plp == NULL:
-           raise StopIteration
+        if self.iter.plp == NULL:
+           raise StopIteration
 
-        return self._call()
+        return self._call()
 
 
 
@@ -3441,10 +3527,10 @@ __all__ = ["Samfile",
            "PileupColumn", 
            "PileupProxy", 
            "PileupRead",
-           "IteratorSNPCalls",
-           "SNPCaller",
-           "IndelCaller",
-           "IteratorIndelCalls", 
+           "IteratorSNPCalls",
+           "SNPCaller",
+           "IndelCaller",
+           "IteratorIndelCalls", 
            "IndexedReads" ]
 
                
index 950e28e6252b9d741b71d26fc13e03ee5e0a427a..7e15c43d068428d502b4c46d934d7a681747613d 100644 (file)
@@ -170,7 +170,7 @@ cdef extern from "tabix.h":
   # char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
 
 cdef class Tabixfile:
-    cdef char * filename
+    cdef char * _filename
 
     # pointer to tabixfile
     cdef tabix_t * tabixfile
index 25c1a1ee732df3e383a29e80c1ea2ae533b7925e..a31f3f244b37329286cc23760d5c2942b8628103 100644 (file)
@@ -33,7 +33,9 @@ cdef class Tabixfile:
         if self.tabixfile != NULL: self.close()
         self.tabixfile = NULL
 
-        self.filename = filename
+        if self._filename != NULL: free(self._filename )
+        self._filename = strdup( filename )
+
         filename_index = filename + ".tbi"
 
         if mode[0] == 'w':
@@ -42,14 +44,14 @@ cdef class Tabixfile:
 
         elif mode[0] == "r":
             # open file for reading
-            if not os.path.exists( self.filename ):
-                raise IOError( "file `%s` not found" % self.filename)
+            if not os.path.exists( self._filename ):
+                raise IOError( "file `%s` not found" % self._filename)
 
             if not os.path.exists( filename_index ):
                 raise IOError( "index `%s` not found" % filename_index)
 
             # open file and load index
-            self.tabixfile = ti_open( self.filename, filename_index )
+            self.tabixfile = ti_open( self._filename, filename_index )
 
         if self.tabixfile == NULL:
             raise IOError("could not open file `%s`" % filename )
@@ -136,12 +138,26 @@ cdef class Tabixfile:
             else:
                 return TabixIteratorParsed( self, -1, 0, 0, parser )
 
+    ###############################################################
+    ###############################################################
+    ###############################################################
+    ## properties
+    ###############################################################
+    property filename:
+        '''filename associated with this object.'''
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            return self._filename
+
     property header:
+        '''the file header.
+          
+        .. note::
+            The header is returned as an iterator over lines without the
+            newline character.
+        '''
+        
         def __get__( self ):
-            '''return header lines as an iterator.
-
-            Note that the header lines do not contain the newline '\n' character.
-            '''
             return TabixHeaderIterator( self )
 
     property contigs:
@@ -158,6 +174,22 @@ cdef class Tabixfile:
                 result.append( sequences[x] )
             return result
             
+    def close( self ):
+        '''
+        closes the :class:`pysam.Tabixfile`.'''
+        if self.tabixfile != NULL:
+            ti_close( self.tabixfile )
+            self.tabixfile = NULL
+
+    def __dealloc__( self ):
+        # remember: dealloc cannot call other python methods
+        # note: no doc string
+        # note: __del__ is not called.
+        if self.tabixfile != NULL:
+            ti_close( self.tabixfile )
+            self.tabixfile = NULL
+        if self._filename != NULL: free( self._filename )
+
 cdef class TabixIterator:
     """iterates over rows in *tabixfile* in region
     given by *tid*, *start* and *end*.
@@ -265,7 +297,10 @@ cdef class Parser:
     pass
 
 cdef class asTuple(Parser):
-    '''converts a :term:`tabix row` into a python tuple.''' 
+    '''converts a :term:`tabix row` into a python tuple.
+
+    Access is by numeric index.
+    ''' 
     def __call__(self, char * buffer, int len):
         cdef TabProxies.TupleProxy r
         r = TabProxies.TupleProxy()
@@ -275,7 +310,36 @@ cdef class asTuple(Parser):
         return r
 
 cdef class asGTF(Parser):
-    '''converts a :term:`tabix row` into a GTF record.''' 
+    '''converts a :term:`tabix row` into a GTF record with the following 
+    fields:
+
+    contig
+       contig
+    feature
+       feature
+    source
+       source
+    start
+       genomic start coordinate (0-based)
+    end
+       genomic end coordinate plus one (0-based)
+    score
+       feature score
+    strand
+       strand
+    frame
+       frame
+    attributes
+       attribute string.
+
+    GTF formatted entries also defined the attributes:
+
+    gene_id
+       the gene identifier
+    transcript_ind
+       the transcript identifier
+    
+    ''' 
     def __call__(self, char * buffer, int len):
         cdef TabProxies.GTFProxy r
         r = TabProxies.GTFProxy()
@@ -283,7 +347,39 @@ cdef class asGTF(Parser):
         return r
 
 cdef class asBed( Parser ):
-    '''converts a :term:`tabix row` into a GTF record.''' 
+    '''converts a :term:`tabix row` into a bed record
+    with the following fields:
+
+    contig
+       contig
+    start
+       genomic start coordinate (zero-based)
+    end
+       genomic end coordinate plus one (zero-based)
+    name
+       name of feature.
+    score
+       score of feature
+    strand
+       strand of feature
+    thickStart
+       thickStart
+    thickEnd
+       thickEnd
+    itemRGB
+       itemRGB
+    blockCount
+       number of bocks
+    blockSizes
+       ',' separated string of block sizes
+    blockStarts
+       ',' separated string of block genomic start positions
+
+    Only the first three fields are required. Additional
+    fields are optional, but if one is defined, all the preceeding
+    need to be defined as well.
+
+    ''' 
     def __call__(self, char * buffer, int len):
         cdef TabProxies.BedProxy r
         r = TabProxies.BedProxy()
@@ -291,7 +387,35 @@ cdef class asBed( Parser ):
         return r
 
 cdef class asVCF( Parser ): 
-    '''converts a :term:`tabix row` into a VCF record.'''
+    '''converts a :term:`tabix row` into a VCF record with
+    the following fields:
+    
+    contig
+       contig
+    pos
+       chromosomal position, zero-based
+    id 
+       id
+    ref
+       reference
+    alt
+       alt
+    qual
+       qual
+    filter
+       filter
+    info
+       info
+    format
+       format specifier.
+
+    Access to genotypes is via index::
+
+        contig = vcf.contig
+        first_sample_genotype = vcf[0]
+        second_sample_genotype = vcf[1]
+
+    '''
     def __call__(self, char * buffer, int len ):
         cdef TabProxies.VCFProxy r
         r = TabProxies.VCFProxy()
index 82eae7d1868ff4b1072995053ff6b22929a2d1c7..d194519d5e20e227a6c1d69ba9d9128e3f26b897 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.13 on Thu May  5 15:40:49 2011 */
+/* Generated by Cython 0.14.1 on Sat Oct 15 05:27:48 2011 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
   #define PyBytes_Repr                 PyString_Repr
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+#endif
+
+#if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
 #endif
-
 #ifndef PySet_CheckExact
-#  define PySet_CheckExact(obj)          (Py_TYPE(obj) == &PySet_Type)
+  #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)
 #endif
 
 #if PY_MAJOR_VERSION >= 3
-  #define PyBoolObject PyLongObject
+  #define PyBoolObject                 PyLongObject
 #endif
 
 
   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
 #endif
 
+#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
+  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
+  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
+#else
+  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
+  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
+#endif
+
 #if PY_MAJOR_VERSION >= 3
   #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
 #endif
 #include "bgzf.h"
 #include "tabix.h"
 
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+
 /* inline attribute */
 #ifndef CYTHON_INLINE
   #if defined(__GNUC__)
   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     #define CYTHON_INLINE inline
   #else
-    #define CYTHON_INLINE 
+    #define CYTHON_INLINE
   #endif
 #endif
 
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__)) 
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
 #   else
 #     define CYTHON_UNUSED
 #   endif
 # elif defined(__ICC) || defined(__INTEL_COMPILER)
-#   define CYTHON_UNUSED __attribute__ ((__unused__)) 
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
 # else
-#   define CYTHON_UNUSED 
+#   define CYTHON_UNUSED
 # endif
 #endif
 
@@ -257,7 +286,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 
 #ifdef __GNUC__
 /* Test for GCC > 2.95 */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
 #define likely(x)   __builtin_expect(!!(x), 1)
 #define unlikely(x) __builtin_expect(!!(x), 0)
 #else /* __GNUC__ > 2 ... */
@@ -287,7 +316,7 @@ static const char *__pyx_f[] = {
 
 /* Type declarations */
 
-/* "pysam/TabProxies.pxd":42
+/* "TabProxies.pxd":42
  *   ctypedef int uint64_t
  * 
  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
@@ -307,7 +336,7 @@ struct __pyx_obj_10TabProxies_TupleProxy {
   int is_modified;
 };
 
-/* "pysam/TabProxies.pxd":77
+/* "TabProxies.pxd":77
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
@@ -319,7 +348,7 @@ struct __pyx_obj_10TabProxies_NamedTupleProxy {
   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
 };
 
-/* "pysam/TabProxies.pxd":80
+/* "TabProxies.pxd":80
  *     pass
  * 
  * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
@@ -335,7 +364,7 @@ struct __pyx_obj_10TabProxies_BedProxy {
   int bedfields;
 };
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":94
+/* "cvcf.pyx":94
  * ###########################################################################################################
  * 
  * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
@@ -350,7 +379,7 @@ struct __pyx_obj_4cvcf_VCFRecord {
   uint32_t pos;
 };
 
-/* "pysam/TabProxies.pxd":91
+/* "TabProxies.pxd":91
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
@@ -364,7 +393,7 @@ struct __pyx_obj_10TabProxies_VCFProxy {
   uint32_t pos;
 };
 
-/* "pysam/ctabix.pxd":178
+/* "ctabix.pxd":178
  *     cdef tabix_t * tabixfile
  * 
  * cdef class Parser:             # <<<<<<<<<<<<<<
@@ -375,7 +404,7 @@ struct __pyx_obj_6ctabix_Parser {
   PyObject_HEAD
 };
 
-/* "pysam/TabProxies.pxd":60
+/* "TabProxies.pxd":60
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
@@ -397,7 +426,7 @@ struct __pyx_obj_10TabProxies_GTFProxy {
   int hasOwnAttributes;
 };
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":221
+/* "cvcf.pyx":221
  * 
  * 
  * cdef class asVCFRecord( ctabix.Parser ):             # <<<<<<<<<<<<<<
@@ -410,7 +439,7 @@ struct __pyx_obj_4cvcf_asVCFRecord {
   PyObject *vcffile;
 };
 
-/* "pysam/ctabix.pxd":172
+/* "ctabix.pxd":172
  *   # char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
  * 
  * cdef class Tabixfile:             # <<<<<<<<<<<<<<
@@ -425,7 +454,7 @@ struct __pyx_obj_6ctabix_Tabixfile {
 };
 
 
-/* "pysam/TabProxies.pxd":42
+/* "TabProxies.pxd":42
  *   ctypedef int uint64_t
  * 
  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
@@ -443,7 +472,7 @@ struct __pyx_vtabstruct_10TabProxies_TupleProxy {
 static struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtabptr_10TabProxies_TupleProxy;
 
 
-/* "pysam/TabProxies.pxd":77
+/* "TabProxies.pxd":77
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
@@ -457,7 +486,7 @@ struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy {
 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
 
 
-/* "pysam/TabProxies.pxd":91
+/* "TabProxies.pxd":91
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
@@ -471,7 +500,7 @@ struct __pyx_vtabstruct_10TabProxies_VCFProxy {
 static struct __pyx_vtabstruct_10TabProxies_VCFProxy *__pyx_vtabptr_10TabProxies_VCFProxy;
 
 
-/* "pysam/TabProxies.pxd":60
+/* "TabProxies.pxd":60
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
  * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
@@ -485,7 +514,7 @@ struct __pyx_vtabstruct_10TabProxies_GTFProxy {
 static struct __pyx_vtabstruct_10TabProxies_GTFProxy *__pyx_vtabptr_10TabProxies_GTFProxy;
 
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":94
+/* "cvcf.pyx":94
  * ###########################################################################################################
  * 
  * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
@@ -499,7 +528,7 @@ struct __pyx_vtabstruct_4cvcf_VCFRecord {
 static struct __pyx_vtabstruct_4cvcf_VCFRecord *__pyx_vtabptr_4cvcf_VCFRecord;
 
 
-/* "pysam/TabProxies.pxd":80
+/* "TabProxies.pxd":80
  *     pass
  * 
  * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
@@ -560,12 +589,12 @@ static struct __pyx_vtabstruct_10TabProxies_BedProxy *__pyx_vtabptr_10TabProxies
 
 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
-static void __Pyx_RaiseDoubleKeywordsError(
-    const char* func_name, PyObject* kw_name); /*proto*/
-
 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
 
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name, PyObject* kw_name); /*proto*/
+
 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
 
 
@@ -644,6 +673,11 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i)
 
 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
 static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
 
 #define __Pyx_PyObject_AsDouble(obj) \
@@ -652,7 +686,6 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
 
 static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);
 
-
 #if PY_MAJOR_VERSION >= 3
 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
     PyObject *value;
@@ -823,12 +856,24 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
 
 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
 
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, const char *modname); /*proto*/
+static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
 
-static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
+                                   PyObject *modname); /*proto*/
 
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+#define __pyx_binding_PyCFunctionType_USED 1
+
+typedef struct {
+    PyCFunctionObject func;
+} __pyx_binding_PyCFunctionType_object;
+
+static PyTypeObject __pyx_binding_PyCFunctionType_type;
+static PyTypeObject *__pyx_binding_PyCFunctionType = NULL;
+
+static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */
+#define __pyx_binding_PyCFunctionType_New(ml, self) __pyx_binding_PyCFunctionType_NewEx(ml, self, NULL)
+
+static int __pyx_binding_PyCFunctionType_init(void); /* proto */
 
 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
 
@@ -868,7 +913,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
 
 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
-static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
+static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
 
 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
 
@@ -891,7 +936,7 @@ static PyTypeObject *__pyx_ptype_10TabProxies_VCFProxy = 0;
 static PyTypeObject *__pyx_ptype_4cvcf_VCFRecord = 0;
 static PyTypeObject *__pyx_ptype_4cvcf_asVCFRecord = 0;
 #define __Pyx_MODULE_NAME "cvcf"
-int __pyx_module_is_main_cvcf = 0;
+static int __pyx_module_is_main_cvcf = 0;
 
 /* Implementation of cvcf */
 static PyObject *__pyx_builtin_object;
@@ -907,126 +952,108 @@ static PyObject *__pyx_builtin_KeyError;
 static PyObject *__pyx_builtin_NotImplementedError;
 static char __pyx_k_1[] = "";
 static char __pyx_k_2[] = ",";
-static char __pyx_k_3[] = ":";
-static char __pyx_k_4[] = "-";
-static char __pyx_k_5[] = "Don't understand region string '%s'";
-static char __pyx_k_6[] = ".";
-static char __pyx_k_7[] = ";";
-static char __pyx_k_8[] = "=";
-static char __pyx_k_9[] = "BAD_NUMBER_OF_VALUES";
-static char __pyx_k_10[] = "(found %s values in element %s; expected %s)";
-static char __pyx_k_11[] = "BAD_NUMBER_OF_PARAMETERS";
-static char __pyx_k_12[] = "id=%s, expected %s parameters, got %s";
-static char __pyx_k_14[] = "Line %s: '%s'\n%s %s: %s\n";
-static char __pyx_k_16[] = "<";
-static char __pyx_k_17[] = "V40_MISSING_ANGLE_BRACKETS";
-static char __pyx_k_18[] = ">";
-static char __pyx_k_19[] = "\"";
-static char __pyx_k_20[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS";
-static char __pyx_k_21[] = "BADLY_FORMATTED_FORMAT_STRING";
-static char __pyx_k_22[] = "ID=";
-static char __pyx_k_23[] = "Number=";
-static char __pyx_k_24[] = "Type=";
-static char __pyx_k_25[] = "Description=";
-static char __pyx_k_26[] = "FORMAT_MISSING_QUOTES";
-static char __pyx_k_27[] = "<none>";
-static char __pyx_k_28[] = "#alleles";
-static char __pyx_k_29[] = "#nonref_alleles";
-static char __pyx_k_30[] = "#genotypes";
-static char __pyx_k_31[] = "#phased_genotypes";
-static char __pyx_k_33[] = "Unknown number type encountered: %s";
-static char __pyx_k_34[] = "%s=%s";
-static char __pyx_k_35[] = "(Undefined tag)";
-static char __pyx_k_38[] = "(output)";
-static char __pyx_k_39[] = "Genotype Quality";
-static char __pyx_k_40[] = "Read depth at this position for this sample";
-static char __pyx_k_41[] = "Haplotype Quality";
-static char __pyx_k_42[] = "Sample Genotype Filter";
-static char __pyx_k_43[] = "##";
-static char __pyx_k_44[] = "VCFv3.3";
-static char __pyx_k_45[] = "VCFv4.0";
-static char __pyx_k_46[] = "VCFv4.1";
-static char __pyx_k_47[] = "UNKNOWN_FORMAT_STRING";
-static char __pyx_k_48[] = "##fileformat=VCFv%s.%s\n";
-static char __pyx_k_49[] = "##%s=%s\n";
-static char __pyx_k_50[] = "#";
-static char __pyx_k_51[] = "\t";
-static char __pyx_k_52[] = "HEADING_NOT_SEPARATED_BY_TABS";
-static char __pyx_k_53[] = "(%sth entry not found)";
-static char __pyx_k_54[] = "(found %s, expected %s)";
-static char __pyx_k_55[] = "BADLY_FORMATTED_HEADING";
-static char __pyx_k_56[] = "\n";
-static char __pyx_k_57[] = "|";
-static char __pyx_k_58[] = "ERROR_FLAG_HAS_VALUE";
-static char __pyx_k_59[] = "ERROR_FORMAT_NOT_NUMERICAL";
-static char __pyx_k_60[] = "ERROR_FORMAT_NOT_CHAR";
-static char __pyx_k_62[] = "BAD_NUMBER_OF_COLUMNS";
-static char __pyx_k_63[] = "expected %s for %s samples (%s), got %s";
-static char __pyx_k_64[] = "(reference is %s, VCF says %s)";
-static char __pyx_k_65[] = "V33_UNMATCHED_DELETION";
-static char __pyx_k_66[] = "(deletion is %s, reference is %s)";
-static char __pyx_k_67[] = "MISSING_INDEL_ALLELE_REF_BASE";
-static char __pyx_k_68[] = "Required key %s not found in data";
-static char __pyx_k_69[] = "enter_default_format";
-static char __pyx_k_70[] = "Can only handle v3.3 and v4.0 VCF files";
-static char __pyx_k_71[] = "Invalid error string: %s";
-static char __pyx_k_72[] = "needs to be checked";
-static char __pyx_k_73[] = "[|/\\\\]";
-static char __pyx_k_74[] = "^[ACGTN]+$";
-static char __pyx_k_75[] = "id numbertype number type description missingvalue";
-static char __pyx_k_76[] = "UNKNOWN_FORMAT_STRING:Unknown file format identifier";
-static char __pyx_k_77[] = "BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string";
-static char __pyx_k_78[] = "BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s";
-static char __pyx_k_79[] = "BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)";
-static char __pyx_k_80[] = "POS_NOT_NUMERICAL:Position column is not numerical";
-static char __pyx_k_81[] = "UNKNOWN_CHAR_IN_REF:Unknown character in reference field";
-static char __pyx_k_82[] = "V33_BAD_REF:Reference should be single-character in v3.3 VCF";
-static char __pyx_k_83[] = "V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF";
-static char __pyx_k_84[] = "POS_NOT_POSITIVE:Position field must be >0";
-static char __pyx_k_85[] = "QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'";
-static char __pyx_k_86[] = "ERROR_INFO_STRING:Error while parsing info field";
-static char __pyx_k_87[] = "ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)";
-static char __pyx_k_88[] = "ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s";
-static char __pyx_k_89[] = "ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string";
-static char __pyx_k_90[] = "FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header";
-static char __pyx_k_91[] = "FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header";
-static char __pyx_k_92[] = "BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)";
-static char __pyx_k_93[] = "BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)";
-static char __pyx_k_94[] = "BAD_GENOTYPE:Cannot parse genotype (%s)";
-static char __pyx_k_95[] = "V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)";
-static char __pyx_k_96[] = "MISSING_REF:Reference allele missing";
-static char __pyx_k_97[] = "V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)";
-static char __pyx_k_98[] = "V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets";
-static char __pyx_k_99[] = "FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes";
+static char __pyx_k_4[] = ":";
+static char __pyx_k_6[] = "-";
+static char __pyx_k_8[] = "Don't understand region string '%s'";
+static char __pyx_k_9[] = ".";
+static char __pyx_k_11[] = ";";
+static char __pyx_k_14[] = "=";
+static char __pyx_k_18[] = "BAD_NUMBER_OF_VALUES";
+static char __pyx_k_19[] = "(found %s values in element %s; expected %s)";
+static char __pyx_k_20[] = "BAD_NUMBER_OF_PARAMETERS";
+static char __pyx_k_21[] = "id=%s, expected %s parameters, got %s";
+static char __pyx_k_25[] = "Line %s: '%s'\n%s %s: %s\n";
+static char __pyx_k_27[] = "<";
+static char __pyx_k_29[] = "V40_MISSING_ANGLE_BRACKETS";
+static char __pyx_k_30[] = ">";
+static char __pyx_k_34[] = "\"";
+static char __pyx_k_38[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS";
+static char __pyx_k_39[] = "BADLY_FORMATTED_FORMAT_STRING";
+static char __pyx_k_40[] = "ID=";
+static char __pyx_k_41[] = "Number=";
+static char __pyx_k_42[] = "Type=";
+static char __pyx_k_43[] = "Description=";
+static char __pyx_k_52[] = "FORMAT_MISSING_QUOTES";
+static char __pyx_k_55[] = "<none>";
+static char __pyx_k_56[] = "#alleles";
+static char __pyx_k_57[] = "#nonref_alleles";
+static char __pyx_k_58[] = "#genotypes";
+static char __pyx_k_59[] = "#phased_genotypes";
+static char __pyx_k_61[] = "Unknown number type encountered: %s";
+static char __pyx_k_62[] = "%s=%s";
+static char __pyx_k_63[] = "(Undefined tag)";
+static char __pyx_k_66[] = "(output)";
+static char __pyx_k_69[] = "Genotype Quality";
+static char __pyx_k_70[] = "Read depth at this position for this sample";
+static char __pyx_k_71[] = "Haplotype Quality";
+static char __pyx_k_72[] = "Sample Genotype Filter";
+static char __pyx_k_73[] = "##";
+static char __pyx_k_76[] = "VCFv3.3";
+static char __pyx_k_77[] = "VCFv4.0";
+static char __pyx_k_78[] = "VCFv4.1";
+static char __pyx_k_79[] = "UNKNOWN_FORMAT_STRING";
+static char __pyx_k_80[] = "##fileformat=VCFv%s.%s\n";
+static char __pyx_k_81[] = "##%s=%s\n";
+static char __pyx_k_82[] = "#";
+static char __pyx_k_85[] = "\t";
+static char __pyx_k_87[] = "HEADING_NOT_SEPARATED_BY_TABS";
+static char __pyx_k_88[] = "(%sth entry not found)";
+static char __pyx_k_89[] = "(found %s, expected %s)";
+static char __pyx_k_90[] = "BADLY_FORMATTED_HEADING";
+static char __pyx_k_91[] = "\n";
+static char __pyx_k_92[] = "|";
+static char __pyx_k_93[] = "ERROR_FLAG_HAS_VALUE";
+static char __pyx_k_97[] = "ERROR_FORMAT_NOT_NUMERICAL";
+static char __pyx_k_98[] = "ERROR_FORMAT_NOT_CHAR";
 static char __pyx_k__0[] = "0";
 static char __pyx_k__D[] = "D";
 static char __pyx_k__I[] = "I";
 static char __pyx_k__N[] = "N";
-static char __pyx_k_100[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields";
-static char __pyx_k_101[] = "HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs";
-static char __pyx_k_102[] = "WRONG_REF:Wrong reference %s";
-static char __pyx_k_103[] = "ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data";
-static char __pyx_k_104[] = "BAD_CHR_TAG:Error calculating chr tag for %s";
-static char __pyx_k_105[] = "ZERO_LENGTH_ALLELE:Found zero-length allele";
-static char __pyx_k_106[] = "MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base";
-static char __pyx_k_107[] = "VCF.getsamples (line 880)";
-static char __pyx_k_108[] = "VCF.setsamples (line 884)";
-static char __pyx_k_109[] = "VCF.getheader (line 888)";
-static char __pyx_k_110[] = "VCF.setheader (line 892)";
-static char __pyx_k_111[] = "VCF.getinfo (line 896)";
-static char __pyx_k_112[] = "VCF.setinfo (line 900)";
-static char __pyx_k_113[] = "VCF.getformat (line 904)";
-static char __pyx_k_114[] = "VCF.setformat (line 908)";
-static char __pyx_k_115[] = "VCF.getfilter (line 912)";
-static char __pyx_k_116[] = "VCF.setfilter (line 916)";
-static char __pyx_k_117[] = "VCF.setreference (line 927)";
-static char __pyx_k_118[] = "VCF.parse (line 939)";
-static char __pyx_k_119[] = "VCF.write (line 946)";
-static char __pyx_k_120[] = "VCF.writeheader (line 952)";
-static char __pyx_k_121[] = "VCF.compare_calls (line 957)";
-static char __pyx_k_122[] = "VCF.connect (line 979)";
-static char __pyx_k_123[] = "VCF.fetch (line 984)";
-static char __pyx_k_124[] = "VCF.validate (line 993)";
+static char __pyx_k_101[] = "BAD_NUMBER_OF_COLUMNS";
+static char __pyx_k_102[] = "expected %s for %s samples (%s), got %s";
+static char __pyx_k_103[] = "(reference is %s, VCF says %s)";
+static char __pyx_k_111[] = "V33_UNMATCHED_DELETION";
+static char __pyx_k_112[] = "(deletion is %s, reference is %s)";
+static char __pyx_k_113[] = "MISSING_INDEL_ALLELE_REF_BASE";
+static char __pyx_k_115[] = "Required key %s not found in data";
+static char __pyx_k_118[] = "enter_default_format";
+static char __pyx_k_119[] = "Can only handle v3.3 and v4.0 VCF files";
+static char __pyx_k_121[] = "Invalid error string: %s";
+static char __pyx_k_122[] = "needs to be checked";
+static char __pyx_k_126[] = "[|/\\\\]";
+static char __pyx_k_128[] = "^[ACGTN]+$";
+static char __pyx_k_130[] = "id numbertype number type description missingvalue";
+static char __pyx_k_132[] = "UNKNOWN_FORMAT_STRING:Unknown file format identifier";
+static char __pyx_k_133[] = "BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string";
+static char __pyx_k_134[] = "BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s";
+static char __pyx_k_135[] = "BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)";
+static char __pyx_k_136[] = "POS_NOT_NUMERICAL:Position column is not numerical";
+static char __pyx_k_137[] = "UNKNOWN_CHAR_IN_REF:Unknown character in reference field";
+static char __pyx_k_138[] = "V33_BAD_REF:Reference should be single-character in v3.3 VCF";
+static char __pyx_k_139[] = "V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF";
+static char __pyx_k_140[] = "POS_NOT_POSITIVE:Position field must be >0";
+static char __pyx_k_141[] = "QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'";
+static char __pyx_k_142[] = "ERROR_INFO_STRING:Error while parsing info field";
+static char __pyx_k_143[] = "ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)";
+static char __pyx_k_144[] = "ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s";
+static char __pyx_k_145[] = "ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string";
+static char __pyx_k_146[] = "FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header";
+static char __pyx_k_147[] = "FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header";
+static char __pyx_k_148[] = "BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)";
+static char __pyx_k_149[] = "BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)";
+static char __pyx_k_150[] = "BAD_GENOTYPE:Cannot parse genotype (%s)";
+static char __pyx_k_151[] = "V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)";
+static char __pyx_k_152[] = "MISSING_REF:Reference allele missing";
+static char __pyx_k_153[] = "V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)";
+static char __pyx_k_154[] = "V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets";
+static char __pyx_k_155[] = "FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes";
+static char __pyx_k_156[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields";
+static char __pyx_k_157[] = "HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs";
+static char __pyx_k_158[] = "WRONG_REF:Wrong reference %s";
+static char __pyx_k_159[] = "ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data";
+static char __pyx_k_160[] = "BAD_CHR_TAG:Error calculating chr tag for %s";
+static char __pyx_k_161[] = "ZERO_LENGTH_ALLELE:Found zero-length allele";
+static char __pyx_k_162[] = "MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base";
 static char __pyx_k__DP[] = "DP";
 static char __pyx_k__FT[] = "FT";
 static char __pyx_k__GQ[] = "GQ";
@@ -1063,6 +1090,7 @@ static char __pyx_k__Type[] = "Type";
 static char __pyx_k__alt1[] = "alt1";
 static char __pyx_k__alt2[] = "alt2";
 static char __pyx_k__copy[] = "copy";
+static char __pyx_k__cvcf[] = "cvcf";
 static char __pyx_k__data[] = "data";
 static char __pyx_k__find[] = "find";
 static char __pyx_k__info[] = "info";
@@ -1105,6 +1133,7 @@ static char __pyx_k__Number[] = "Number";
 static char __pyx_k__String[] = "String";
 static char __pyx_k___lines[] = "_lines";
 static char __pyx_k___parse[] = "_parse";
+static char __pyx_k__append[] = "append";
 static char __pyx_k__bisect[] = "bisect";
 static char __pyx_k__buffer[] = "buffer";
 static char __pyx_k__contig[] = "contig";
@@ -1222,6 +1251,7 @@ static char __pyx_k__convertGTback[] = "convertGTback";
 static char __pyx_k__datagenerator[] = "datagenerator";
 static char __pyx_k__format_format[] = "format_format";
 static char __pyx_k__parse_heading[] = "parse_heading";
+static char __pyx_k__parse_regions[] = "parse_regions";
 static char __pyx_k__write_heading[] = "write_heading";
 static char __pyx_k__V33_BAD_ALLELE[] = "V33_BAD_ALLELE";
 static char __pyx_k__V40_BAD_ALLELE[] = "V40_BAD_ALLELE";
@@ -1243,124 +1273,107 @@ static char __pyx_k__NT_PHASED_GENOTYPES[] = "NT_PHASED_GENOTYPES";
 static char __pyx_k__NotImplementedError[] = "NotImplementedError";
 static char __pyx_k__UNKNOWN_CHAR_IN_REF[] = "UNKNOWN_CHAR_IN_REF";
 static PyObject *__pyx_kp_s_1;
-static PyObject *__pyx_kp_s_10;
-static PyObject *__pyx_kp_s_100;
-static PyObject *__pyx_kp_s_101;
+static PyObject *__pyx_n_s_101;
 static PyObject *__pyx_kp_s_102;
 static PyObject *__pyx_kp_s_103;
-static PyObject *__pyx_kp_s_104;
-static PyObject *__pyx_kp_s_105;
-static PyObject *__pyx_kp_s_106;
-static PyObject *__pyx_kp_u_107;
-static PyObject *__pyx_kp_u_108;
-static PyObject *__pyx_kp_u_109;
-static PyObject *__pyx_n_s_11;
-static PyObject *__pyx_kp_u_110;
-static PyObject *__pyx_kp_u_111;
-static PyObject *__pyx_kp_u_112;
-static PyObject *__pyx_kp_u_113;
-static PyObject *__pyx_kp_u_114;
-static PyObject *__pyx_kp_u_115;
-static PyObject *__pyx_kp_u_116;
-static PyObject *__pyx_kp_u_117;
-static PyObject *__pyx_kp_u_118;
-static PyObject *__pyx_kp_u_119;
-static PyObject *__pyx_kp_s_12;
-static PyObject *__pyx_kp_u_120;
-static PyObject *__pyx_kp_u_121;
-static PyObject *__pyx_kp_u_122;
-static PyObject *__pyx_kp_u_123;
-static PyObject *__pyx_kp_u_124;
+static PyObject *__pyx_kp_s_11;
+static PyObject *__pyx_n_s_111;
+static PyObject *__pyx_kp_s_112;
+static PyObject *__pyx_n_s_113;
+static PyObject *__pyx_kp_s_115;
+static PyObject *__pyx_n_s_118;
+static PyObject *__pyx_kp_s_119;
+static PyObject *__pyx_kp_s_121;
+static PyObject *__pyx_kp_s_122;
+static PyObject *__pyx_kp_s_126;
+static PyObject *__pyx_kp_s_128;
+static PyObject *__pyx_kp_s_130;
+static PyObject *__pyx_kp_s_132;
+static PyObject *__pyx_kp_s_133;
+static PyObject *__pyx_kp_s_134;
+static PyObject *__pyx_kp_s_135;
+static PyObject *__pyx_kp_s_136;
+static PyObject *__pyx_kp_s_137;
+static PyObject *__pyx_kp_s_138;
+static PyObject *__pyx_kp_s_139;
 static PyObject *__pyx_kp_s_14;
-static PyObject *__pyx_kp_s_16;
-static PyObject *__pyx_n_s_17;
-static PyObject *__pyx_kp_s_18;
+static PyObject *__pyx_kp_s_140;
+static PyObject *__pyx_kp_s_141;
+static PyObject *__pyx_kp_s_142;
+static PyObject *__pyx_kp_s_143;
+static PyObject *__pyx_kp_s_144;
+static PyObject *__pyx_kp_s_145;
+static PyObject *__pyx_kp_s_146;
+static PyObject *__pyx_kp_s_147;
+static PyObject *__pyx_kp_s_148;
+static PyObject *__pyx_kp_s_149;
+static PyObject *__pyx_kp_s_150;
+static PyObject *__pyx_kp_s_151;
+static PyObject *__pyx_kp_s_152;
+static PyObject *__pyx_kp_s_153;
+static PyObject *__pyx_kp_s_154;
+static PyObject *__pyx_kp_s_155;
+static PyObject *__pyx_kp_s_156;
+static PyObject *__pyx_kp_s_157;
+static PyObject *__pyx_kp_s_158;
+static PyObject *__pyx_kp_s_159;
+static PyObject *__pyx_kp_s_160;
+static PyObject *__pyx_kp_s_161;
+static PyObject *__pyx_kp_s_162;
+static PyObject *__pyx_n_s_18;
 static PyObject *__pyx_kp_s_19;
 static PyObject *__pyx_kp_s_2;
 static PyObject *__pyx_n_s_20;
-static PyObject *__pyx_n_s_21;
-static PyObject *__pyx_kp_s_22;
-static PyObject *__pyx_kp_s_23;
-static PyObject *__pyx_kp_s_24;
+static PyObject *__pyx_kp_s_21;
 static PyObject *__pyx_kp_s_25;
-static PyObject *__pyx_n_s_26;
 static PyObject *__pyx_kp_s_27;
-static PyObject *__pyx_kp_s_28;
-static PyObject *__pyx_kp_s_29;
-static PyObject *__pyx_kp_s_3;
+static PyObject *__pyx_n_s_29;
 static PyObject *__pyx_kp_s_30;
-static PyObject *__pyx_kp_s_31;
-static PyObject *__pyx_kp_s_33;
 static PyObject *__pyx_kp_s_34;
-static PyObject *__pyx_kp_s_35;
-static PyObject *__pyx_kp_s_38;
-static PyObject *__pyx_kp_s_39;
+static PyObject *__pyx_n_s_38;
+static PyObject *__pyx_n_s_39;
 static PyObject *__pyx_kp_s_4;
 static PyObject *__pyx_kp_s_40;
 static PyObject *__pyx_kp_s_41;
 static PyObject *__pyx_kp_s_42;
 static PyObject *__pyx_kp_s_43;
-static PyObject *__pyx_kp_s_44;
-static PyObject *__pyx_kp_s_45;
-static PyObject *__pyx_kp_s_46;
-static PyObject *__pyx_n_s_47;
-static PyObject *__pyx_kp_s_48;
-static PyObject *__pyx_kp_s_49;
-static PyObject *__pyx_kp_s_5;
-static PyObject *__pyx_kp_s_50;
-static PyObject *__pyx_kp_s_51;
 static PyObject *__pyx_n_s_52;
-static PyObject *__pyx_kp_s_53;
-static PyObject *__pyx_kp_s_54;
-static PyObject *__pyx_n_s_55;
+static PyObject *__pyx_kp_s_55;
 static PyObject *__pyx_kp_s_56;
 static PyObject *__pyx_kp_s_57;
-static PyObject *__pyx_n_s_58;
-static PyObject *__pyx_n_s_59;
-static PyObject *__pyx_kp_b_6;
+static PyObject *__pyx_kp_s_58;
+static PyObject *__pyx_kp_s_59;
 static PyObject *__pyx_kp_s_6;
-static PyObject *__pyx_n_s_60;
-static PyObject *__pyx_n_s_62;
+static PyObject *__pyx_kp_s_61;
+static PyObject *__pyx_kp_s_62;
 static PyObject *__pyx_kp_s_63;
-static PyObject *__pyx_kp_s_64;
-static PyObject *__pyx_n_s_65;
 static PyObject *__pyx_kp_s_66;
-static PyObject *__pyx_n_s_67;
-static PyObject *__pyx_kp_s_68;
-static PyObject *__pyx_n_s_69;
-static PyObject *__pyx_kp_s_7;
+static PyObject *__pyx_kp_s_69;
 static PyObject *__pyx_kp_s_70;
 static PyObject *__pyx_kp_s_71;
 static PyObject *__pyx_kp_s_72;
 static PyObject *__pyx_kp_s_73;
-static PyObject *__pyx_kp_s_74;
-static PyObject *__pyx_kp_s_75;
 static PyObject *__pyx_kp_s_76;
 static PyObject *__pyx_kp_s_77;
 static PyObject *__pyx_kp_s_78;
-static PyObject *__pyx_kp_s_79;
+static PyObject *__pyx_n_s_79;
 static PyObject *__pyx_kp_s_8;
 static PyObject *__pyx_kp_s_80;
 static PyObject *__pyx_kp_s_81;
 static PyObject *__pyx_kp_s_82;
-static PyObject *__pyx_kp_s_83;
-static PyObject *__pyx_kp_s_84;
 static PyObject *__pyx_kp_s_85;
-static PyObject *__pyx_kp_s_86;
-static PyObject *__pyx_kp_s_87;
+static PyObject *__pyx_n_s_87;
 static PyObject *__pyx_kp_s_88;
 static PyObject *__pyx_kp_s_89;
-static PyObject *__pyx_n_s_9;
-static PyObject *__pyx_kp_s_90;
+static PyObject *__pyx_kp_b_9;
+static PyObject *__pyx_kp_s_9;
+static PyObject *__pyx_n_s_90;
 static PyObject *__pyx_kp_s_91;
 static PyObject *__pyx_kp_s_92;
-static PyObject *__pyx_kp_s_93;
-static PyObject *__pyx_kp_s_94;
-static PyObject *__pyx_kp_s_95;
-static PyObject *__pyx_kp_s_96;
-static PyObject *__pyx_kp_s_97;
-static PyObject *__pyx_kp_s_98;
-static PyObject *__pyx_kp_s_99;
+static PyObject *__pyx_n_s_93;
+static PyObject *__pyx_n_s_97;
+static PyObject *__pyx_n_s_98;
+static PyObject *__pyx_kp_b__0;
 static PyObject *__pyx_kp_s__0;
 static PyObject *__pyx_n_s__ACGTN;
 static PyObject *__pyx_n_s__ALT;
@@ -1402,6 +1415,7 @@ static PyObject *__pyx_n_s__NT_PHASED_GENOTYPES;
 static PyObject *__pyx_n_s__NT_UNKNOWN;
 static PyObject *__pyx_n_s__NotImplementedError;
 static PyObject *__pyx_n_s__Number;
+static PyObject *__pyx_n_b__PASS;
 static PyObject *__pyx_n_s__PASS;
 static PyObject *__pyx_n_s__POS;
 static PyObject *__pyx_n_s__POS_NOT_NUMERICAL;
@@ -1454,6 +1468,7 @@ static PyObject *__pyx_n_s__alleleRegEx;
 static PyObject *__pyx_n_s__alt;
 static PyObject *__pyx_n_s__alt1;
 static PyObject *__pyx_n_s__alt2;
+static PyObject *__pyx_n_s__append;
 static PyObject *__pyx_n_s__bisect;
 static PyObject *__pyx_n_s__buffer;
 static PyObject *__pyx_n_s__chrom;
@@ -1465,6 +1480,7 @@ static PyObject *__pyx_n_s__contig;
 static PyObject *__pyx_n_s__convertGT;
 static PyObject *__pyx_n_s__convertGTback;
 static PyObject *__pyx_n_s__copy;
+static PyObject *__pyx_n_s__cvcf;
 static PyObject *__pyx_n_s__data;
 static PyObject *__pyx_n_s__datagenerator;
 static PyObject *__pyx_n_s__deepcopy;
@@ -1531,6 +1547,7 @@ static PyObject *__pyx_n_s__parse_format;
 static PyObject *__pyx_n_s__parse_formatdata;
 static PyObject *__pyx_n_s__parse_header;
 static PyObject *__pyx_n_s__parse_heading;
+static PyObject *__pyx_n_s__parse_regions;
 static PyObject *__pyx_n_s__parser;
 static PyObject *__pyx_n_s__pos;
 static PyObject *__pyx_n_s__pos1;
@@ -1616,14 +1633,70 @@ static PyObject *__pyx_int_33;
 static PyObject *__pyx_int_40;
 static PyObject *__pyx_int_100;
 static PyObject *__pyx_int_3000000000;
-static PyObject *__pyx_k_13;
-static PyObject *__pyx_k_15;
-static PyObject *__pyx_k_32;
-static PyObject *__pyx_k_36;
-static PyObject *__pyx_k_37;
-static PyObject *__pyx_k_61;
-
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":58
+static PyObject *__pyx_k_22;
+static PyObject *__pyx_k_26;
+static PyObject *__pyx_k_60;
+static PyObject *__pyx_k_64;
+static PyObject *__pyx_k_65;
+static PyObject *__pyx_k_99;
+static PyObject *__pyx_k_tuple_3;
+static PyObject *__pyx_k_tuple_5;
+static PyObject *__pyx_k_tuple_7;
+static PyObject *__pyx_k_tuple_10;
+static PyObject *__pyx_k_tuple_12;
+static PyObject *__pyx_k_tuple_13;
+static PyObject *__pyx_k_tuple_15;
+static PyObject *__pyx_k_tuple_16;
+static PyObject *__pyx_k_tuple_17;
+static PyObject *__pyx_k_tuple_23;
+static PyObject *__pyx_k_tuple_24;
+static PyObject *__pyx_k_tuple_28;
+static PyObject *__pyx_k_tuple_31;
+static PyObject *__pyx_k_tuple_32;
+static PyObject *__pyx_k_tuple_33;
+static PyObject *__pyx_k_tuple_35;
+static PyObject *__pyx_k_tuple_36;
+static PyObject *__pyx_k_tuple_37;
+static PyObject *__pyx_k_tuple_44;
+static PyObject *__pyx_k_tuple_45;
+static PyObject *__pyx_k_tuple_46;
+static PyObject *__pyx_k_tuple_47;
+static PyObject *__pyx_k_tuple_48;
+static PyObject *__pyx_k_tuple_49;
+static PyObject *__pyx_k_tuple_50;
+static PyObject *__pyx_k_tuple_51;
+static PyObject *__pyx_k_tuple_53;
+static PyObject *__pyx_k_tuple_54;
+static PyObject *__pyx_k_tuple_67;
+static PyObject *__pyx_k_tuple_68;
+static PyObject *__pyx_k_tuple_74;
+static PyObject *__pyx_k_tuple_75;
+static PyObject *__pyx_k_tuple_83;
+static PyObject *__pyx_k_tuple_84;
+static PyObject *__pyx_k_tuple_86;
+static PyObject *__pyx_k_tuple_94;
+static PyObject *__pyx_k_tuple_95;
+static PyObject *__pyx_k_tuple_96;
+static PyObject *__pyx_k_tuple_100;
+static PyObject *__pyx_k_tuple_104;
+static PyObject *__pyx_k_tuple_105;
+static PyObject *__pyx_k_tuple_106;
+static PyObject *__pyx_k_tuple_107;
+static PyObject *__pyx_k_tuple_108;
+static PyObject *__pyx_k_tuple_109;
+static PyObject *__pyx_k_tuple_110;
+static PyObject *__pyx_k_tuple_114;
+static PyObject *__pyx_k_tuple_116;
+static PyObject *__pyx_k_tuple_117;
+static PyObject *__pyx_k_tuple_120;
+static PyObject *__pyx_k_tuple_123;
+static PyObject *__pyx_k_tuple_124;
+static PyObject *__pyx_k_tuple_125;
+static PyObject *__pyx_k_tuple_127;
+static PyObject *__pyx_k_tuple_129;
+static PyObject *__pyx_k_tuple_131;
+
+/* "cvcf.pyx":58
  * 
  * # Utility function.  Uses 0-based coordinates
  * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
@@ -1632,6 +1705,7 @@ static PyObject *__pyx_k_61;
  */
 
 static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_get_sequence = {__Pyx_NAMESTR("get_sequence"), (PyCFunction)__pyx_pf_4cvcf_get_sequence, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_chrom = 0;
   PyObject *__pyx_v_start = 0;
@@ -1709,7 +1783,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_sequence = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":60
+  /* "cvcf.pyx":60
  * def get_sequence(chrom, start, end, fa):
  *     # obtain sequence from .fa file, without truncation
  *     if end<=start: return ""             # <<<<<<<<<<<<<<
@@ -1729,7 +1803,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":61
+  /* "cvcf.pyx":61
  *     # obtain sequence from .fa file, without truncation
  *     if end<=start: return ""
  *     if not fa: return "N"*(end-start)             # <<<<<<<<<<<<<<
@@ -1752,7 +1826,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":62
+  /* "cvcf.pyx":62
  *     if end<=start: return ""
  *     if not fa: return "N"*(end-start)
  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()             # <<<<<<<<<<<<<<
@@ -1773,7 +1847,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
     __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_INCREF(__pyx_v_chrom);
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom);
     __Pyx_GIVEREF(__pyx_v_chrom);
@@ -1786,10 +1860,10 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
     __Pyx_INCREF(__pyx_v_fa);
     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_fa);
     __Pyx_GIVEREF(__pyx_v_fa);
-    __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__upper); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -1807,7 +1881,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":63
+  /* "cvcf.pyx":63
  *     if not fa: return "N"*(end-start)
  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
  *     sequence = fa.fetch(chrom, start, end).upper()             # <<<<<<<<<<<<<<
@@ -1817,7 +1891,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   __pyx_t_5 = PyObject_GetAttr(__pyx_v_fa, __pyx_n_s__fetch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
   __Pyx_INCREF(__pyx_v_chrom);
   PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_chrom);
   __Pyx_GIVEREF(__pyx_v_chrom);
@@ -1827,10 +1901,10 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   __Pyx_INCREF(__pyx_v_end);
   PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_end);
   __Pyx_GIVEREF(__pyx_v_end);
-  __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
   __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__upper); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -1841,7 +1915,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   __pyx_v_sequence = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":64
+  /* "cvcf.pyx":64
  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
  *     sequence = fa.fetch(chrom, start, end).upper()
  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))             # <<<<<<<<<<<<<<
@@ -1882,7 +1956,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":65
+  /* "cvcf.pyx":65
  *     sequence = fa.fetch(chrom, start, end).upper()
  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))
  *     return sequence             # <<<<<<<<<<<<<<
@@ -1910,7 +1984,7 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":68
+/* "cvcf.pyx":68
  * 
  * # Utility function.  Parses a region string
  * def parse_regions( string ):             # <<<<<<<<<<<<<<
@@ -1918,8 +1992,9 @@ static PyObject *__pyx_pf_4cvcf_get_sequence(PyObject *__pyx_self, PyObject *__p
  *     for r in string.split(','):
  */
 
-static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string); /*proto*/
-static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string) {
+static PyObject *__pyx_pf_4cvcf_1parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_1parse_regions = {__Pyx_NAMESTR("parse_regions"), (PyCFunction)__pyx_pf_4cvcf_1parse_regions, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_1parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string) {
   PyObject *__pyx_v_result;
   PyObject *__pyx_v_r;
   PyObject *__pyx_v_elts;
@@ -1940,7 +2015,7 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
   int __pyx_t_10;
   __Pyx_RefNannySetupContext("parse_regions");
   __pyx_self = __pyx_self;
-  __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_r = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_elts = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_chrom = Py_None; __Pyx_INCREF(Py_None);
@@ -1948,7 +2023,7 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
   __pyx_v_end = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_ielts = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":69
+  /* "cvcf.pyx":69
  * # Utility function.  Parses a region string
  * def parse_regions( string ):
  *     result = []             # <<<<<<<<<<<<<<
@@ -1961,7 +2036,7 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
   __pyx_v_result = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":70
+  /* "cvcf.pyx":70
  * def parse_regions( string ):
  *     result = []
  *     for r in string.split(','):             # <<<<<<<<<<<<<<
@@ -1970,87 +2045,75 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
  */
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_string, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_2));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
-    __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3);
+  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
   }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_3))) {
-      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
+    if (likely(PyList_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
     } else {
-      __pyx_t_4 = PyIter_Next(__pyx_t_3);
-      if (!__pyx_t_4) {
+      __pyx_t_3 = PyIter_Next(__pyx_t_1);
+      if (!__pyx_t_3) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_3);
     }
     __Pyx_DECREF(__pyx_v_r);
-    __pyx_v_r = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_r = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":71
+    /* "cvcf.pyx":71
  *     result = []
  *     for r in string.split(','):
  *         elts = r.split(':')             # <<<<<<<<<<<<<<
  *         chrom, start, end = elts[0], 0, 3000000000
  *         if len(elts)==1: pass
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_r, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetAttr(__pyx_v_r, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_elts);
-    __pyx_v_elts = __pyx_t_5;
-    __pyx_t_5 = 0;
+    __pyx_v_elts = __pyx_t_4;
+    __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":72
+    /* "cvcf.pyx":72
  *     for r in string.split(','):
  *         elts = r.split(':')
  *         chrom, start, end = elts[0], 0, 3000000000             # <<<<<<<<<<<<<<
  *         if len(elts)==1: pass
  *         elif len(elts)==2:
  */
-    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_1 = __pyx_int_0;
-    __Pyx_INCREF(__pyx_t_1);
-    __pyx_t_4 = __pyx_int_3000000000;
-    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = __pyx_int_0;
+    __Pyx_INCREF(__pyx_t_3);
+    __pyx_t_5 = __pyx_int_3000000000;
+    __Pyx_INCREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_v_chrom);
-    __pyx_v_chrom = __pyx_t_5;
-    __pyx_t_5 = 0;
+    __pyx_v_chrom = __pyx_t_4;
+    __pyx_t_4 = 0;
     __Pyx_DECREF(__pyx_v_start);
-    __pyx_v_start = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_start = __pyx_t_3;
+    __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_end);
-    __pyx_v_end = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_end = __pyx_t_5;
+    __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":73
+    /* "cvcf.pyx":73
  *         elts = r.split(':')
  *         chrom, start, end = elts[0], 0, 3000000000
  *         if len(elts)==1: pass             # <<<<<<<<<<<<<<
@@ -2063,7 +2126,7 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":74
+    /* "cvcf.pyx":74
  *         chrom, start, end = elts[0], 0, 3000000000
  *         if len(elts)==1: pass
  *         elif len(elts)==2:             # <<<<<<<<<<<<<<
@@ -2074,46 +2137,40 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
     __pyx_t_7 = (__pyx_t_6 == 2);
     if (__pyx_t_7) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":75
+      /* "cvcf.pyx":75
  *         if len(elts)==1: pass
  *         elif len(elts)==2:
  *             if len(elts[1])>0:             # <<<<<<<<<<<<<<
  *                 ielts = elts[1].split('-')
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
  */
-      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       __pyx_t_7 = (__pyx_t_6 > 0);
       if (__pyx_t_7) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":76
+        /* "cvcf.pyx":76
  *         elif len(elts)==2:
  *             if len(elts[1])>0:
  *                 ielts = elts[1].split('-')             # <<<<<<<<<<<<<<
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
  */
-        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__split); 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);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
-        PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_4));
-        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
-        __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __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_4); __pyx_t_4 = 0;
+        __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __Pyx_DECREF(__pyx_v_ielts);
         __pyx_v_ielts = __pyx_t_5;
         __pyx_t_5 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":77
+        /* "cvcf.pyx":77
  *             if len(elts[1])>0:
  *                 ielts = elts[1].split('-')
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)             # <<<<<<<<<<<<<<
@@ -2123,22 +2180,22 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
         __pyx_t_6 = PyObject_Length(__pyx_v_ielts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __pyx_t_7 = (__pyx_t_6 != 2);
         if (__pyx_t_7) {
-          __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_v_r); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
+          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
           __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
           __pyx_t_5 = 0;
-          __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_5);
-          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
           goto __pyx_L9;
         }
         __pyx_L9:;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":78
+        /* "cvcf.pyx":78
  *                 ielts = elts[1].split('-')
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])             # <<<<<<<<<<<<<<
@@ -2154,30 +2211,30 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
           /*try:*/ {
             __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_ielts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
             __Pyx_GOTREF(__pyx_t_5);
-            __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__pyx_t_4);
-            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
             __Pyx_GIVEREF(__pyx_t_5);
             __pyx_t_5 = 0;
-            __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
             __Pyx_GOTREF(__pyx_t_5);
-            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-            __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__pyx_t_4);
+            __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+            __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_3);
             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
             __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_ielts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
             __Pyx_GOTREF(__pyx_t_5);
-            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
+            __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
             __Pyx_GIVEREF(__pyx_t_5);
             __pyx_t_5 = 0;
-            __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
             __Pyx_GOTREF(__pyx_t_5);
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
             __Pyx_DECREF(__pyx_v_start);
-            __pyx_v_start = __pyx_t_4;
-            __pyx_t_4 = 0;
+            __pyx_v_start = __pyx_t_3;
+            __pyx_t_3 = 0;
             __Pyx_DECREF(__pyx_v_end);
             __pyx_v_end = __pyx_t_5;
             __pyx_t_5 = 0;
@@ -2187,11 +2244,11 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
           __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
           goto __pyx_L17_try_end;
           __pyx_L10_error:;
-          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
           __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":79
+          /* "cvcf.pyx":79
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
  *                 except: raise ValueError("Don't understand region string '%s'" % r)             # <<<<<<<<<<<<<<
@@ -2200,26 +2257,26 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
  */
           /*except:*/ {
             __Pyx_AddTraceback("cvcf.parse_regions");
-            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
             __Pyx_GOTREF(__pyx_t_5);
+            __Pyx_GOTREF(__pyx_t_3);
             __Pyx_GOTREF(__pyx_t_4);
-            __Pyx_GOTREF(__pyx_t_1);
-            __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_v_r); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+            __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
             __Pyx_GOTREF(((PyObject *)__pyx_t_8));
             __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-            __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_GOTREF(((PyObject *)__pyx_t_9));
             PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
             __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
             __pyx_t_8 = 0;
-            __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+            __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
             __Pyx_GOTREF(__pyx_t_8);
-            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
             __Pyx_Raise(__pyx_t_8, 0, 0);
             __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
             __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
             goto __pyx_L11_exception_handled;
           }
           __pyx_L12_except_error:;
@@ -2242,30 +2299,30 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":81
+      /* "cvcf.pyx":81
  *                 except: raise ValueError("Don't understand region string '%s'" % r)
  *         else:
  *             raise ValueError("Don't understand region string '%s'" % r)             # <<<<<<<<<<<<<<
  *         result.append( (chrom,start,end) )
  *     return result
  */
-      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_v_r); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+      __pyx_t_4 = 0;
+      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_Raise(__pyx_t_1, 0, 0);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __pyx_L7:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":82
+    /* "cvcf.pyx":82
  *         else:
  *             raise ValueError("Don't understand region string '%s'" % r)
  *         result.append( (chrom,start,end) )             # <<<<<<<<<<<<<<
@@ -2275,23 +2332,23 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
     if (unlikely(__pyx_v_result == Py_None)) {
       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
-    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
     __Pyx_INCREF(__pyx_v_chrom);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom);
     __Pyx_GIVEREF(__pyx_v_chrom);
     __Pyx_INCREF(__pyx_v_start);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_start);
     __Pyx_GIVEREF(__pyx_v_start);
     __Pyx_INCREF(__pyx_v_end);
-    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
+    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_end);
     __Pyx_GIVEREF(__pyx_v_end);
-    __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_result), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_10 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__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;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":83
+  /* "cvcf.pyx":83
  *             raise ValueError("Don't understand region string '%s'" % r)
  *         result.append( (chrom,start,end) )
  *     return result             # <<<<<<<<<<<<<<
@@ -2327,7 +2384,7 @@ static PyObject *__pyx_pf_4cvcf_parse_regions(PyObject *__pyx_self, PyObject *__
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":104
+/* "cvcf.pyx":104
  *     cdef uint32_t pos
  * 
  *     def __init__(self, vcf):             # <<<<<<<<<<<<<<
@@ -2373,7 +2430,7 @@ static int __pyx_pf_4cvcf_9VCFRecord___init__(PyObject *__pyx_v_self, PyObject *
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":105
+  /* "cvcf.pyx":105
  * 
  *     def __init__(self, vcf):
  *         self.vcf = vcf             # <<<<<<<<<<<<<<
@@ -2391,7 +2448,7 @@ static int __pyx_pf_4cvcf_9VCFRecord___init__(PyObject *__pyx_v_self, PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":115
+/* "cvcf.pyx":115
  *         #                     len(data)))
  * 
  *     def __cinit__(self, vcf ):             # <<<<<<<<<<<<<<
@@ -2399,8 +2456,8 @@ static int __pyx_pf_4cvcf_9VCFRecord___init__(PyObject *__pyx_v_self, PyObject *
  *         self.offset = 9
  */
 
-static int __pyx_pf_4cvcf_9VCFRecord___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pf_4cvcf_9VCFRecord___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pf_4cvcf_9VCFRecord_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pf_4cvcf_9VCFRecord_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_vcf = 0;
   int __pyx_r;
   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcf,0};
@@ -2437,7 +2494,7 @@ static int __pyx_pf_4cvcf_9VCFRecord___cinit__(PyObject *__pyx_v_self, PyObject
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":117
+  /* "cvcf.pyx":117
  *     def __cinit__(self, vcf ):
  *         # start indexed access at genotypes
  *         self.offset = 9             # <<<<<<<<<<<<<<
@@ -2446,7 +2503,7 @@ static int __pyx_pf_4cvcf_9VCFRecord___cinit__(PyObject *__pyx_v_self, PyObject
  */
   ((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->__pyx_base.offset = 9;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":119
+  /* "cvcf.pyx":119
  *         self.offset = 9
  * 
  *         self.vcf = vcf             # <<<<<<<<<<<<<<
@@ -2464,7 +2521,7 @@ static int __pyx_pf_4cvcf_9VCFRecord___cinit__(PyObject *__pyx_v_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":121
+/* "cvcf.pyx":121
  *         self.vcf = vcf
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -2477,7 +2534,7 @@ static  PyObject *__pyx_f_4cvcf_9VCFRecord_update(struct __pyx_obj_4cvcf_VCFReco
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("update");
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":126
+  /* "cvcf.pyx":126
  *         nbytes does not include the terminal '\0'.
  *         '''
  *         TabProxies.TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
@@ -2488,7 +2545,7 @@ static  PyObject *__pyx_f_4cvcf_9VCFRecord_update(struct __pyx_obj_4cvcf_VCFReco
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":128
+  /* "cvcf.pyx":128
  *         TabProxies.TupleProxy.update( self, buffer, nbytes )
  * 
  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
@@ -2497,7 +2554,7 @@ static  PyObject *__pyx_f_4cvcf_9VCFRecord_update(struct __pyx_obj_4cvcf_VCFReco
  */
   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.fields[0]);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":130
+  /* "cvcf.pyx":130
  *         self.contig = self.fields[0]
  *         # vcf counts from 1 - correct here
  *         self.pos = atoi( self.fields[1] ) - 1             # <<<<<<<<<<<<<<
@@ -2518,7 +2575,7 @@ static  PyObject *__pyx_f_4cvcf_9VCFRecord_update(struct __pyx_obj_4cvcf_VCFReco
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":132
+/* "cvcf.pyx":132
  *         self.pos = atoi( self.fields[1] ) - 1
  * 
  *     def __len__(self):             # <<<<<<<<<<<<<<
@@ -2526,15 +2583,15 @@ static  PyObject *__pyx_f_4cvcf_9VCFRecord_update(struct __pyx_obj_4cvcf_VCFReco
  * 
  */
 
-static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord___len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord___len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord_2__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord_2__len__(PyObject *__pyx_v_self) {
   Py_ssize_t __pyx_r;
   long __pyx_t_1;
   long __pyx_t_2;
   long __pyx_t_3;
   __Pyx_RefNannySetupContext("__len__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":133
+  /* "cvcf.pyx":133
  * 
  *     def __len__(self):
  *         return max(0, self.nfields - 9)             # <<<<<<<<<<<<<<
@@ -2557,7 +2614,7 @@ static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord___len__(PyObject *__pyx_v_self) {
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":136
+/* "cvcf.pyx":136
  * 
  *     property contig:
  *         def __get__(self): return self.contig             # <<<<<<<<<<<<<<
@@ -2589,7 +2646,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6contig___get__(PyObject *__pyx_v_sel
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":139
+/* "cvcf.pyx":139
  * 
  *     property pos:
  *         def __get__(self): return self.pos             # <<<<<<<<<<<<<<
@@ -2621,7 +2678,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3pos___get__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":142
+/* "cvcf.pyx":142
  * 
  *     property id:
  *         def __get__(self): return self.fields[2]             # <<<<<<<<<<<<<<
@@ -2653,7 +2710,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_2id___get__(PyObject *__pyx_v_self) {
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":145
+/* "cvcf.pyx":145
  * 
  *     property ref:
  *         def __get__(self): return self.fields[3]             # <<<<<<<<<<<<<<
@@ -2685,7 +2742,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3ref___get__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":148
+/* "cvcf.pyx":148
  * 
  *     property alt:
  *         def __get__(self):             # <<<<<<<<<<<<<<
@@ -2700,11 +2757,10 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(PyObject *__pyx_v_self)
   PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
   __Pyx_RefNannySetupContext("__get__");
   __pyx_v_alt = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":150
+  /* "cvcf.pyx":150
  *         def __get__(self):
  *             # convert v3.3 to v4.0 alleles below
  *             alt = self.fields[4]             # <<<<<<<<<<<<<<
@@ -2717,14 +2773,14 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(PyObject *__pyx_v_self)
   __pyx_v_alt = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":151
+  /* "cvcf.pyx":151
  *             # convert v3.3 to v4.0 alleles below
  *             alt = self.fields[4]
  *             if alt == ".": alt = []             # <<<<<<<<<<<<<<
  *             else: alt = alt.upper().split(',')
  *             return alt
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __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 = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -2738,7 +2794,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(PyObject *__pyx_v_self)
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":152
+    /* "cvcf.pyx":152
  *             alt = self.fields[4]
  *             if alt == ".": alt = []
  *             else: alt = alt.upper().split(',')             # <<<<<<<<<<<<<<
@@ -2753,22 +2809,16 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(PyObject *__pyx_v_self)
     __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-    __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_alt);
-    __pyx_v_alt = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_alt = __pyx_t_3;
+    __pyx_t_3 = 0;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":153
+  /* "cvcf.pyx":153
  *             if alt == ".": alt = []
  *             else: alt = alt.upper().split(',')
  *             return alt             # <<<<<<<<<<<<<<
@@ -2785,7 +2835,6 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(PyObject *__pyx_v_self)
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("cvcf.VCFRecord.alt.__get__");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -2795,7 +2844,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":156
+/* "cvcf.pyx":156
  * 
  *     property qual:
  *         def __get__(self):             # <<<<<<<<<<<<<<
@@ -2819,7 +2868,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(PyObject *__pyx_v_self)
   __Pyx_RefNannySetupContext("__get__");
   __pyx_v_qual = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":157
+  /* "cvcf.pyx":157
  *     property qual:
  *         def __get__(self):
  *             qual = self.fields[5]             # <<<<<<<<<<<<<<
@@ -2832,14 +2881,14 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(PyObject *__pyx_v_self)
   __pyx_v_qual = ((PyObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":158
+  /* "cvcf.pyx":158
  *         def __get__(self):
  *             qual = self.fields[5]
  *             if qual == b".": qual = -1             # <<<<<<<<<<<<<<
  *             else:
  *                 try:    qual = float(qual)
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_qual, ((PyObject *)__pyx_kp_b_6), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_qual, ((PyObject *)__pyx_kp_b_9), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __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 = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -2851,7 +2900,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(PyObject *__pyx_v_self)
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":160
+    /* "cvcf.pyx":160
  *             if qual == b".": qual = -1
  *             else:
  *                 try:    qual = float(qual)             # <<<<<<<<<<<<<<
@@ -2879,7 +2928,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(PyObject *__pyx_v_self)
       __pyx_L6_error:;
       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":161
+      /* "cvcf.pyx":161
  *             else:
  *                 try:    qual = float(qual)
  *                 except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
@@ -2895,27 +2944,27 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(PyObject *__pyx_v_self)
         __pyx_t_6 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
         __Pyx_GOTREF(__pyx_t_6);
         __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
         __Pyx_INCREF(__pyx_v_self);
         PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
         __Pyx_GIVEREF(__pyx_v_self);
-        __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+        __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
         __Pyx_GOTREF(__pyx_t_7);
         __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
         PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
         __Pyx_GIVEREF(__pyx_t_8);
         PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
         __Pyx_GIVEREF(__pyx_t_7);
         __pyx_t_8 = 0;
         __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+        __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
         __Pyx_GOTREF(__pyx_t_7);
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -2957,7 +3006,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":164
+/* "cvcf.pyx":164
  * 
  *     property filter:
  *         def __get__(self):             # <<<<<<<<<<<<<<
@@ -2969,16 +3018,15 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(PyObject *__pyx_v_sel
 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(PyObject *__pyx_v_self) {
   char *__pyx_v_f;
   PyObject *__pyx_r = NULL;
-  int __pyx_t_1;
-  int __pyx_t_2;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
   int __pyx_t_3;
   int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
   __Pyx_RefNannySetupContext("__get__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":165
+  /* "cvcf.pyx":165
  *     property filter:
  *         def __get__(self):
  *             f = self.fields[6]             # <<<<<<<<<<<<<<
@@ -2987,38 +3035,56 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(PyObject *__pyx_v_sel
  */
   __pyx_v_f = (((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->__pyx_base.fields[6]);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":167
+  /* "cvcf.pyx":167
  *             f = self.fields[6]
  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
  *             if f == b"." or f == b"PASS" or f == b"0": return []             # <<<<<<<<<<<<<<
  *             else: return f.split(';')
  * 
  */
-  __pyx_t_1 = (__pyx_v_f == __pyx_k_6);
-  if (!__pyx_t_1) {
-    __pyx_t_2 = (__pyx_v_f == __pyx_k__PASS);
-    if (!__pyx_t_2) {
-      __pyx_t_3 = (__pyx_v_f == __pyx_k__0);
-      __pyx_t_4 = __pyx_t_3;
+  __pyx_t_1 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b_9), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!__pyx_t_3) {
+    __pyx_t_2 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_n_b__PASS), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!__pyx_t_4) {
+      __pyx_t_1 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b__0), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_6 = __pyx_t_5;
     } else {
-      __pyx_t_4 = __pyx_t_2;
+      __pyx_t_6 = __pyx_t_4;
     }
-    __pyx_t_2 = __pyx_t_4;
+    __pyx_t_4 = __pyx_t_6;
   } else {
-    __pyx_t_2 = __pyx_t_1;
+    __pyx_t_4 = __pyx_t_3;
   }
-  if (__pyx_t_2) {
+  if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    __pyx_r = ((PyObject *)__pyx_t_5);
-    __pyx_t_5 = 0;
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = 0;
     goto __pyx_L0;
     goto __pyx_L5;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":168
+    /* "cvcf.pyx":168
  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
  *             if f == b"." or f == b"PASS" or f == b"0": return []
  *             else: return f.split(';')             # <<<<<<<<<<<<<<
@@ -3026,22 +3092,16 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(PyObject *__pyx_v_sel
  *     property info:
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_t_5), __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
-    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_7));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
-    __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __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_5); __pyx_t_5 = 0;
-    __pyx_r = __pyx_t_7;
-    __pyx_t_7 = 0;
+    __pyx_t_2 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
   }
   __pyx_L5:;
@@ -3049,9 +3109,8 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(PyObject *__pyx_v_sel
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("cvcf.VCFRecord.filter.__get__");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -3060,7 +3119,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(PyObject *__pyx_v_sel
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":171
+/* "cvcf.pyx":171
  * 
  *     property info:
  *         def __get__(self):             # <<<<<<<<<<<<<<
@@ -3077,21 +3136,21 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(PyObject *__pyx_v_self)
   PyObject *__pyx_v_v;
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  Py_ssize_t __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  Py_ssize_t __pyx_t_4;
   PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  Py_ssize_t __pyx_t_7;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
   PyObject *__pyx_t_9 = NULL;
   __Pyx_RefNannySetupContext("__get__");
-  __pyx_v_info = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_info = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_blurp = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_elts = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":172
+  /* "cvcf.pyx":172
  *     property info:
  *         def __get__(self):
  *             col = self.fields[7]             # <<<<<<<<<<<<<<
@@ -3100,7 +3159,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(PyObject *__pyx_v_self)
  */
   __pyx_v_col = (((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->__pyx_base.fields[7]);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":174
+  /* "cvcf.pyx":174
  *             col = self.fields[7]
  *             # dictionary of keys, and list of values
  *             info = {}             # <<<<<<<<<<<<<<
@@ -3113,198 +3172,192 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(PyObject *__pyx_v_self)
   __pyx_v_info = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":175
+  /* "cvcf.pyx":175
  *             # dictionary of keys, and list of values
  *             info = {}
  *             if col != b".":             # <<<<<<<<<<<<<<
  *                 for blurp in col.split(';'):
  *                     elts = blurp.split('=')
  */
-  __pyx_t_2 = (__pyx_v_col != __pyx_k_6);
-  if (__pyx_t_2) {
+  __pyx_t_1 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b_9), Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":176
+    /* "cvcf.pyx":176
  *             info = {}
  *             if col != b".":
  *                 for blurp in col.split(';'):             # <<<<<<<<<<<<<<
  *                     elts = blurp.split('=')
  *                     if len(elts) == 1: v = None
  */
-    __pyx_t_1 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_1), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_7));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
-    __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
-      __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1);
+    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+      __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
     } else {
-      __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __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;
     for (;;) {
       if (likely(PyList_CheckExact(__pyx_t_1))) {
-        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
-        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
       } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
-        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
       } else {
-        __pyx_t_5 = PyIter_Next(__pyx_t_1);
-        if (!__pyx_t_5) {
+        __pyx_t_2 = PyIter_Next(__pyx_t_1);
+        if (!__pyx_t_2) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_GOTREF(__pyx_t_2);
       }
       __Pyx_DECREF(__pyx_v_blurp);
-      __pyx_v_blurp = __pyx_t_5;
-      __pyx_t_5 = 0;
+      __pyx_v_blurp = __pyx_t_2;
+      __pyx_t_2 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":177
+      /* "cvcf.pyx":177
  *             if col != b".":
  *                 for blurp in col.split(';'):
  *                     elts = blurp.split('=')             # <<<<<<<<<<<<<<
  *                     if len(elts) == 1: v = None
  *                     elif len(elts) == 2: v = elts[1]
  */
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-      __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __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_v_elts);
-      __pyx_v_elts = __pyx_t_6;
-      __pyx_t_6 = 0;
+      __pyx_v_elts = __pyx_t_5;
+      __pyx_t_5 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":178
+      /* "cvcf.pyx":178
  *                 for blurp in col.split(';'):
  *                     elts = blurp.split('=')
  *                     if len(elts) == 1: v = None             # <<<<<<<<<<<<<<
  *                     elif len(elts) == 2: v = elts[1]
  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
  */
-      __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_2 = (__pyx_t_7 == 1);
-      if (__pyx_t_2) {
+      __pyx_t_6 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = (__pyx_t_6 == 1);
+      if (__pyx_t_3) {
         __Pyx_INCREF(Py_None);
         __Pyx_DECREF(__pyx_v_v);
         __pyx_v_v = Py_None;
         goto __pyx_L8;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":179
+      /* "cvcf.pyx":179
  *                     elts = blurp.split('=')
  *                     if len(elts) == 1: v = None
  *                     elif len(elts) == 2: v = elts[1]             # <<<<<<<<<<<<<<
  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
  */
-      __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_2 = (__pyx_t_7 == 2);
-      if (__pyx_t_2) {
-        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_6 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = (__pyx_t_6 == 2);
+      if (__pyx_t_3) {
+        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
         __Pyx_DECREF(__pyx_v_v);
-        __pyx_v_v = __pyx_t_6;
-        __pyx_t_6 = 0;
+        __pyx_v_v = __pyx_t_5;
+        __pyx_t_5 = 0;
         goto __pyx_L8;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":180
+        /* "cvcf.pyx":180
  *                     if len(elts) == 1: v = None
  *                     elif len(elts) == 2: v = elts[1]
  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
  *             return info
  */
-        __pyx_t_6 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_5 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
         __Pyx_INCREF(__pyx_v_self);
-        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
         __Pyx_GIVEREF(__pyx_v_self);
-        __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
-        __Pyx_GIVEREF(__pyx_t_5);
-        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
-        __Pyx_GIVEREF(__pyx_t_4);
-        __pyx_t_5 = 0;
-        __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
+        __Pyx_GIVEREF(__pyx_t_7);
+        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_7 = 0;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
       __pyx_L8:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":181
+      /* "cvcf.pyx":181
  *                     elif len(elts) == 2: v = elts[1]
  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))             # <<<<<<<<<<<<<<
  *             return info
  * 
  */
-      __pyx_t_4 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_6 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s___info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s___info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
       __Pyx_INCREF(__pyx_v_self);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
       __Pyx_GIVEREF(__pyx_v_self);
-      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
+      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
       __Pyx_GIVEREF(__pyx_t_8);
       __Pyx_INCREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_v);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
-      __Pyx_GIVEREF(__pyx_t_6);
-      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_9);
       __Pyx_GIVEREF(__pyx_t_9);
       __pyx_t_8 = 0;
-      __pyx_t_6 = 0;
+      __pyx_t_5 = 0;
       __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_5, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __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_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_7, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -3312,7 +3365,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(PyObject *__pyx_v_self)
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":182
+  /* "cvcf.pyx":182
  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
  *             return info             # <<<<<<<<<<<<<<
@@ -3328,9 +3381,9 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(PyObject *__pyx_v_self)
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_4);
+  __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_XDECREF(__pyx_t_9);
   __Pyx_AddTraceback("cvcf.VCFRecord.info.__get__");
@@ -3345,7 +3398,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(PyObject *__pyx_v_self)
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":185
+/* "cvcf.pyx":185
  * 
  *     property format:
  *          def __get__(self):             # <<<<<<<<<<<<<<
@@ -3358,10 +3411,9 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6format___get__(PyObject *__pyx_v_sel
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
   __Pyx_RefNannySetupContext("__get__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":186
+  /* "cvcf.pyx":186
  *     property format:
  *          def __get__(self):
  *              return self.fields[8].split(':')             # <<<<<<<<<<<<<<
@@ -3374,17 +3426,11 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6format___get__(PyObject *__pyx_v_sel
   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_t_1), __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
   goto __pyx_L0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -3392,7 +3438,6 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6format___get__(PyObject *__pyx_v_sel
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("cvcf.VCFRecord.format.__get__");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -3401,7 +3446,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_6format___get__(PyObject *__pyx_v_sel
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":189
+/* "cvcf.pyx":189
  * 
  *     property samples:
  *         def __get__(self):             # <<<<<<<<<<<<<<
@@ -3415,7 +3460,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_7samples___get__(PyObject *__pyx_v_se
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("__get__");
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":190
+  /* "cvcf.pyx":190
  *     property samples:
  *         def __get__(self):
  *             return self.vcf._samples             # <<<<<<<<<<<<<<
@@ -3441,7 +3486,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_7samples___get__(PyObject *__pyx_v_se
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":192
+/* "cvcf.pyx":192
  *             return self.vcf._samples
  * 
  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
@@ -3449,8 +3494,8 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord_7samples___get__(PyObject *__pyx_v_se
  *         # parse sample columns
  */
 
-static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pf_4cvcf_9VCFRecord_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pf_4cvcf_9VCFRecord_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_v_values;
   PyObject *__pyx_v_alt;
   PyObject *__pyx_v_format;
@@ -3462,9 +3507,9 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   Py_ssize_t __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  Py_ssize_t __pyx_t_5;
-  int __pyx_t_6;
+  Py_ssize_t __pyx_t_4;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
   PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
   PyObject *__pyx_t_9 = NULL;
@@ -3475,11 +3520,11 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
   __pyx_v_values = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_alt = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_format = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_expected = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":195
+  /* "cvcf.pyx":195
  * 
  *         # parse sample columns
  *         values = self.fields[self.vcf._sample2column[key]].split(':')             # <<<<<<<<<<<<<<
@@ -3498,46 +3543,40 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_values);
-  __pyx_v_values = __pyx_t_4;
-  __pyx_t_4 = 0;
+  __pyx_v_values = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":196
+  /* "cvcf.pyx":196
  *         # parse sample columns
  *         values = self.fields[self.vcf._sample2column[key]].split(':')
  *         alt = self.alt             # <<<<<<<<<<<<<<
  *         format = self.format
  * 
  */
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__alt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_v_alt);
-  __pyx_v_alt = __pyx_t_4;
-  __pyx_t_4 = 0;
+  __pyx_v_alt = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":197
+  /* "cvcf.pyx":197
  *         values = self.fields[self.vcf._sample2column[key]].split(':')
  *         alt = self.alt
  *         format = self.format             # <<<<<<<<<<<<<<
  * 
  *         if len(values) > len(format):
  */
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_v_format);
-  __pyx_v_format = __pyx_t_4;
-  __pyx_t_4 = 0;
+  __pyx_v_format = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":199
+  /* "cvcf.pyx":199
  *         format = self.format
  * 
  *         if len(values) > len(format):             # <<<<<<<<<<<<<<
@@ -3545,47 +3584,47 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  *                            (len(values),key,len(format)))
  */
   __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_6 = (__pyx_t_3 > __pyx_t_5);
-  if (__pyx_t_6) {
+  __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = (__pyx_t_3 > __pyx_t_4);
+  if (__pyx_t_5) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":200
+    /* "cvcf.pyx":200
  * 
  *         if len(values) > len(format):
  *             self.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\             # <<<<<<<<<<<<<<
  *                            (len(values),key,len(format)))
  * 
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__line); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_18); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":201
+    /* "cvcf.pyx":201
  *         if len(values) > len(format):
  *             self.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\
  *                            (len(values),key,len(format)))             # <<<<<<<<<<<<<<
  * 
  *         result = {}
  */
-    __pyx_t_5 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
     __Pyx_GIVEREF(__pyx_t_7);
     __Pyx_INCREF(__pyx_v_key);
@@ -3595,30 +3634,30 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
     __Pyx_GIVEREF(__pyx_t_8);
     __pyx_t_7 = 0;
     __pyx_t_8 = 0;
-    __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
     PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_t_8));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-    __pyx_t_2 = 0;
     __pyx_t_1 = 0;
+    __pyx_t_6 = 0;
     __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":203
+  /* "cvcf.pyx":203
  *                            (len(values),key,len(format)))
  * 
  *         result = {}             # <<<<<<<<<<<<<<
@@ -3631,18 +3670,18 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
   __pyx_v_result = __pyx_t_8;
   __pyx_t_8 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":204
+  /* "cvcf.pyx":204
  * 
  *         result = {}
  *         for idx in range(len(format)):             # <<<<<<<<<<<<<<
  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
  *             if idx < len(values): value = values[idx]
  */
-  __pyx_t_5 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_5; __pyx_t_3+=1) {
+  __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_4; __pyx_t_3+=1) {
     __pyx_v_idx = __pyx_t_3;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":205
+    /* "cvcf.pyx":205
  *         result = {}
  *         for idx in range(len(format)):
  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)             # <<<<<<<<<<<<<<
@@ -3653,28 +3692,28 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
     __Pyx_GOTREF(__pyx_t_8);
     __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_4 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+    __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9);
     __Pyx_GIVEREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_alt);
-    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_alt);
+    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_alt);
     __Pyx_GIVEREF(__pyx_v_alt);
     __pyx_t_9 = 0;
-    __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __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_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_v_expected);
-    __pyx_v_expected = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_expected = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":206
+    /* "cvcf.pyx":206
  *         for idx in range(len(format)):
  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
  *             if idx < len(values): value = values[idx]             # <<<<<<<<<<<<<<
@@ -3682,62 +3721,62 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  *                 if expected == -1: value = "."
  */
     __pyx_t_10 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = (__pyx_v_idx < __pyx_t_10);
-    if (__pyx_t_6) {
-      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = (__pyx_v_idx < __pyx_t_10);
+    if (__pyx_t_5) {
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_4;
-      __pyx_t_4 = 0;
+      __pyx_v_value = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L8;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":208
+      /* "cvcf.pyx":208
  *             if idx < len(values): value = values[idx]
  *             else:
  *                 if expected == -1: value = "."             # <<<<<<<<<<<<<<
  *                 else: value = ",".join(["."]*expected)
  * 
  */
-      __pyx_t_4 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_6) {
-        __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+      __pyx_t_2 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_5) {
+        __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
         __Pyx_DECREF(__pyx_v_value);
-        __pyx_v_value = ((PyObject *)__pyx_kp_s_6);
+        __pyx_v_value = ((PyObject *)__pyx_kp_s_9);
         goto __pyx_L9;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":209
+        /* "cvcf.pyx":209
  *             else:
  *                 if expected == -1: value = "."
  *                 else: value = ",".join(["."]*expected)             # <<<<<<<<<<<<<<
  * 
  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
  */
-        __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-        __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-        PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_6));
-        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-        __pyx_t_8 = PyNumber_Multiply(((PyObject *)__pyx_t_1), __pyx_v_expected); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+        __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+        PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_9));
+        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+        __pyx_t_8 = PyNumber_Multiply(((PyObject *)__pyx_t_6), __pyx_v_expected); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
+        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
         __Pyx_GIVEREF(__pyx_t_8);
         __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
         __Pyx_DECREF(__pyx_v_value);
         __pyx_v_value = __pyx_t_8;
         __pyx_t_8 = 0;
@@ -3746,7 +3785,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
     }
     __pyx_L8:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":211
+    /* "cvcf.pyx":211
  *                 else: value = ",".join(["."]*expected)
  * 
  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))             # <<<<<<<<<<<<<<
@@ -3755,45 +3794,45 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  */
     __pyx_t_8 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_9 = PyBytes_FromString(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->__pyx_base.data); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_9));
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
     __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
     __Pyx_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
-    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_9);
     __Pyx_GIVEREF(__pyx_t_9);
-    __pyx_t_1 = 0;
-    __pyx_t_4 = 0;
+    __pyx_t_6 = 0;
+    __pyx_t_2 = 0;
     __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __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_2); __pyx_t_2 = 0;
-    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_1, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":212
+    /* "cvcf.pyx":212
  * 
  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
  *             if expected != -1 and len(result[format[idx]]) != expected:             # <<<<<<<<<<<<<<
@@ -3802,30 +3841,30 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  */
     __pyx_t_9 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
       __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_9); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_9); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_v_expected, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_v_expected, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __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_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       __pyx_t_12 = __pyx_t_11;
     } else {
-      __pyx_t_12 = __pyx_t_6;
+      __pyx_t_12 = __pyx_t_5;
     }
     if (__pyx_t_12) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":213
+      /* "cvcf.pyx":213
  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
  *             if expected != -1 and len(result[format[idx]]) != expected:
  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,             # <<<<<<<<<<<<<<
@@ -3834,65 +3873,65 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  */
       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->__pyx_base.data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self)->__pyx_base.data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+      PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_1));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_20); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_8);
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":214
+      /* "cvcf.pyx":214
  *             if expected != -1 and len(result[format[idx]]) != expected:
  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))             # <<<<<<<<<<<<<<
  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))
  *                 result[format[idx]] = result[format[idx]][:expected]
  */
-      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_6); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
-      __Pyx_GIVEREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_expected);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_expected);
+      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_expected);
       __Pyx_GIVEREF(__pyx_v_expected);
-      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      __pyx_t_4 = 0;
+      __pyx_t_2 = 0;
       __pyx_t_7 = 0;
-      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
+      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8);
       __Pyx_GIVEREF(__pyx_t_8);
-      PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_t_7));
+      PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_7));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-      __pyx_t_2 = 0;
+      __pyx_t_1 = 0;
       __pyx_t_8 = 0;
       __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":215
+      /* "cvcf.pyx":215
  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))             # <<<<<<<<<<<<<<
@@ -3901,64 +3940,64 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  */
       __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_10 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_expected, Py_LT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_v_expected, Py_LT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       if (__pyx_t_12) {
         __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-        PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_9); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_7 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+        PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
+        __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_9); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyNumber_Multiply(((PyObject *)__pyx_t_1), __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_9 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_t_8), __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_7, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_7, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
         goto __pyx_L11;
       }
       __pyx_L11:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":216
+      /* "cvcf.pyx":216
  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))
  *                 result[format[idx]] = result[format[idx]][:expected]             # <<<<<<<<<<<<<<
@@ -3967,24 +4006,24 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
  */
       __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_7); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_expected); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_7 = PySequence_GetSlice(__pyx_t_8, 0, __pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_t_9, 0, __pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_9, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L10;
     }
     __pyx_L10:;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":218
+  /* "cvcf.pyx":218
  *                 result[format[idx]] = result[format[idx]][:expected]
  * 
  *         return result             # <<<<<<<<<<<<<<
@@ -4001,7 +4040,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_9);
@@ -4019,7 +4058,7 @@ static PyObject *__pyx_pf_4cvcf_9VCFRecord___getitem__(PyObject *__pyx_v_self, P
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":224
+/* "cvcf.pyx":224
  *     '''converts a :term:`tabix row` into a VCF record.'''
  *     cdef vcffile
  *     def __init__(self, vcffile ):             # <<<<<<<<<<<<<<
@@ -4065,7 +4104,7 @@ static int __pyx_pf_4cvcf_11asVCFRecord___init__(PyObject *__pyx_v_self, PyObjec
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":225
+  /* "cvcf.pyx":225
  *     cdef vcffile
  *     def __init__(self, vcffile ):
  *         self.vcffile = vcffile             # <<<<<<<<<<<<<<
@@ -4083,7 +4122,7 @@ static int __pyx_pf_4cvcf_11asVCFRecord___init__(PyObject *__pyx_v_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":226
+/* "cvcf.pyx":226
  *     def __init__(self, vcffile ):
  *         self.vcffile = vcffile
  *     def __call__(self, char * buffer, int len ):             # <<<<<<<<<<<<<<
@@ -4091,8 +4130,8 @@ static int __pyx_pf_4cvcf_11asVCFRecord___init__(PyObject *__pyx_v_self, PyObjec
  *         r = VCFRecord( self.vcffile )
  */
 
-static PyObject *__pyx_pf_4cvcf_11asVCFRecord___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pf_4cvcf_11asVCFRecord___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_11asVCFRecord_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pf_4cvcf_11asVCFRecord_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   char *__pyx_v_buffer;
   int __pyx_v_len;
   struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_r;
@@ -4143,7 +4182,7 @@ static PyObject *__pyx_pf_4cvcf_11asVCFRecord___call__(PyObject *__pyx_v_self, P
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_r = ((struct __pyx_obj_4cvcf_VCFRecord *)Py_None); __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":228
+  /* "cvcf.pyx":228
  *     def __call__(self, char * buffer, int len ):
  *         cdef VCFRecord r
  *         r = VCFRecord( self.vcffile )             # <<<<<<<<<<<<<<
@@ -4151,18 +4190,18 @@ static PyObject *__pyx_pf_4cvcf_11asVCFRecord___call__(PyObject *__pyx_v_self, P
  *         return r
  */
   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(((struct __pyx_obj_4cvcf_asVCFRecord *)__pyx_v_self)->vcffile);
   PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_4cvcf_asVCFRecord *)__pyx_v_self)->vcffile);
   __Pyx_GIVEREF(((struct __pyx_obj_4cvcf_asVCFRecord *)__pyx_v_self)->vcffile);
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cvcf_VCFRecord)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cvcf_VCFRecord)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_v_r));
   __pyx_v_r = ((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":229
+  /* "cvcf.pyx":229
  *         cdef VCFRecord r
  *         r = VCFRecord( self.vcffile )
  *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
@@ -4173,7 +4212,7 @@ static PyObject *__pyx_pf_4cvcf_11asVCFRecord___call__(PyObject *__pyx_v_self, P
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":230
+  /* "cvcf.pyx":230
  *         r = VCFRecord( self.vcffile )
  *         r.copy( buffer, len )
  *         return r             # <<<<<<<<<<<<<<
@@ -4199,7 +4238,7 @@ static PyObject *__pyx_pf_4cvcf_11asVCFRecord___call__(PyObject *__pyx_v_self, P
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":306
+/* "cvcf.pyx":306
  *     _lines = None
  * 
  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):             # <<<<<<<<<<<<<<
@@ -4223,8 +4262,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  int __pyx_t_7;
+  int __pyx_t_6;
   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s___copy,&__pyx_n_s__reference,&__pyx_n_s__regions,&__pyx_n_s__lines,&__pyx_n_s__leftalign,0};
   __Pyx_RefNannySetupContext("__init__");
   __pyx_self = __pyx_self;
@@ -4235,7 +4273,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
     values[2] = ((PyObject *)Py_None);
     values[3] = ((PyObject *)Py_None);
     values[4] = ((PyObject *)Py_None);
-    values[5] = __pyx_k_13;
+    values[5] = __pyx_k_22;
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
       case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
@@ -4291,7 +4329,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
     __pyx_v_reference = ((PyObject *)Py_None);
     __pyx_v_regions = ((PyObject *)Py_None);
     __pyx_v_lines = ((PyObject *)Py_None);
-    __pyx_v_leftalign = __pyx_k_13;
+    __pyx_v_leftalign = __pyx_k_22;
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  6: __pyx_v_leftalign = PyTuple_GET_ITEM(__pyx_args, 5);
       case  5: __pyx_v_lines = PyTuple_GET_ITEM(__pyx_args, 4);
@@ -4313,7 +4351,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_id = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":308
+  /* "cvcf.pyx":308
  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
  *         # make error identifiers accessible by name
  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id             # <<<<<<<<<<<<<<
@@ -4363,25 +4401,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
     __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    if (PyObject_SetItem(__pyx_t_2, __pyx_t_5, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyObject_SetItem(__pyx_t_2, __pyx_t_4, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":309
+  /* "cvcf.pyx":309
  *         # make error identifiers accessible by name
  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
  *         if _copy != None:             # <<<<<<<<<<<<<<
@@ -4390,11 +4422,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
  */
   __pyx_t_3 = PyObject_RichCompare(__pyx_v__copy, Py_None, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_7) {
+  if (__pyx_t_6) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":310
+    /* "cvcf.pyx":310
  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
  *         if _copy != None:
  *             self._leftalign = _copy._leftalign             # <<<<<<<<<<<<<<
@@ -4406,7 +4438,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___leftalign, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":311
+    /* "cvcf.pyx":311
  *         if _copy != None:
  *             self._leftalign = _copy._leftalign
  *             self._header = _copy._header[:]             # <<<<<<<<<<<<<<
@@ -4415,118 +4447,118 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
  */
     __pyx_t_3 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_5 = PySequence_GetSlice(__pyx_t_3, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_t_3, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___header, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":312
+    /* "cvcf.pyx":312
  *             self._leftalign = _copy._leftalign
  *             self._header = _copy._header[:]
  *             self._version = _copy._version             # <<<<<<<<<<<<<<
  *             self._info = copy.deepcopy(_copy._info)
  *             self._filter = copy.deepcopy(_copy._filter)
  */
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___version); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":313
+    /* "cvcf.pyx":313
  *             self._header = _copy._header[:]
  *             self._version = _copy._version
  *             self._info = copy.deepcopy(_copy._info)             # <<<<<<<<<<<<<<
  *             self._filter = copy.deepcopy(_copy._filter)
  *             self._format = copy.deepcopy(_copy._format)
  */
-    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __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 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___info, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___info, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":314
+    /* "cvcf.pyx":314
  *             self._version = _copy._version
  *             self._info = copy.deepcopy(_copy._info)
  *             self._filter = copy.deepcopy(_copy._filter)             # <<<<<<<<<<<<<<
  *             self._format = copy.deepcopy(_copy._format)
  *             self._samples = _copy._samples[:]
  */
-    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___filter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
-    __Pyx_GIVEREF(__pyx_t_5);
-    __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __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;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___filter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___filter, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":315
+    /* "cvcf.pyx":315
  *             self._info = copy.deepcopy(_copy._info)
  *             self._filter = copy.deepcopy(_copy._filter)
  *             self._format = copy.deepcopy(_copy._format)             # <<<<<<<<<<<<<<
  *             self._samples = _copy._samples[:]
  *             self._sample2column = copy.deepcopy(_copy._sample2column)
  */
-    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __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 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___format, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___format, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":316
+    /* "cvcf.pyx":316
  *             self._filter = copy.deepcopy(_copy._filter)
  *             self._format = copy.deepcopy(_copy._format)
  *             self._samples = _copy._samples[:]             # <<<<<<<<<<<<<<
  *             self._sample2column = copy.deepcopy(_copy._sample2column)
  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
  */
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_2 = PySequence_GetSlice(__pyx_t_5, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_t_4, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __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_4); __pyx_t_4 = 0;
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":317
+    /* "cvcf.pyx":317
  *             self._format = copy.deepcopy(_copy._format)
  *             self._samples = _copy._samples[:]
  *             self._sample2column = copy.deepcopy(_copy._sample2column)             # <<<<<<<<<<<<<<
@@ -4535,24 +4567,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
  */
     __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___sample2column); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __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 = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___sample2column, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":318
+    /* "cvcf.pyx":318
  *             self._samples = _copy._samples[:]
  *             self._sample2column = copy.deepcopy(_copy._sample2column)
  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)             # <<<<<<<<<<<<<<
@@ -4566,19 +4598,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___ignored_errors, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":319
+    /* "cvcf.pyx":319
  *             self._sample2column = copy.deepcopy(_copy._sample2column)
  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)             # <<<<<<<<<<<<<<
@@ -4587,24 +4619,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
  */
     __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___warn_errors, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":320
+    /* "cvcf.pyx":320
  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)
  *             self._reference = _copy._reference             # <<<<<<<<<<<<<<
@@ -4616,7 +4648,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":321
+    /* "cvcf.pyx":321
  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)
  *             self._reference = _copy._reference
  *             self._regions = _copy._regions             # <<<<<<<<<<<<<<
@@ -4631,49 +4663,49 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":322
+  /* "cvcf.pyx":322
  *             self._reference = _copy._reference
  *             self._regions = _copy._regions
  *         if reference: self._reference = reference             # <<<<<<<<<<<<<<
  *         if regions: self._regions = regions
  *         if leftalign: self._leftalign = leftalign
  */
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_7) {
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_6) {
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L9;
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":323
+  /* "cvcf.pyx":323
  *             self._regions = _copy._regions
  *         if reference: self._reference = reference
  *         if regions: self._regions = regions             # <<<<<<<<<<<<<<
  *         if leftalign: self._leftalign = leftalign
  *         self._lines = lines
  */
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_regions); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_7) {
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_regions); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_6) {
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L10;
   }
   __pyx_L10:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":324
+  /* "cvcf.pyx":324
  *         if reference: self._reference = reference
  *         if regions: self._regions = regions
  *         if leftalign: self._leftalign = leftalign             # <<<<<<<<<<<<<<
  *         self._lines = lines
  * 
  */
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_leftalign); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_7) {
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_leftalign); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_6) {
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___leftalign, __pyx_v_leftalign) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L11;
   }
   __pyx_L11:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":325
+  /* "cvcf.pyx":325
  *         if regions: self._regions = regions
  *         if leftalign: self._leftalign = leftalign
  *         self._lines = lines             # <<<<<<<<<<<<<<
@@ -4689,7 +4721,6 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
   __Pyx_AddTraceback("cvcf.VCF.__init__");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -4699,7 +4730,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":327
+/* "cvcf.pyx":327
  *         self._lines = lines
  * 
  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
@@ -4707,9 +4738,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF___init__(PyObject *__pyx_self, PyObject *__
  *         errorlabel, errorstring = self._errors[error].split(':')
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_error = {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pf_4cvcf_3VCF_error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_1error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_1error = {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pf_4cvcf_3VCF_1error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_1error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_error = 0;
@@ -4793,7 +4824,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
   __pyx_v_errorstring = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_errwarn = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":328
+  /* "cvcf.pyx":328
  * 
  *     def error(self,line,error,opt=None):
  *         if error in self._ignored_errors: return             # <<<<<<<<<<<<<<
@@ -4812,7 +4843,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":329
+  /* "cvcf.pyx":329
  *     def error(self,line,error,opt=None):
  *         if error in self._ignored_errors: return
  *         errorlabel, errorstring = self._errors[error].split(':')             # <<<<<<<<<<<<<<
@@ -4827,45 +4858,39 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
   __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
-    PyObject* tuple = __pyx_t_4;
-    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
-    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
+    PyObject* tuple = __pyx_t_3;
+    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_errorlabel);
-    __pyx_v_errorlabel = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_v_errorstring);
-    __pyx_v_errorstring = __pyx_t_1;
+    __pyx_v_errorlabel = __pyx_t_1;
     __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_v_errorstring);
+    __pyx_v_errorstring = __pyx_t_4;
+    __pyx_t_4 = 0;
   } else {
-    __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_v_errorlabel);
-    __pyx_v_errorlabel = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_v_errorstring);
-    __pyx_v_errorstring = __pyx_t_1;
+    __pyx_v_errorlabel = __pyx_t_1;
     __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_v_errorstring);
+    __pyx_v_errorstring = __pyx_t_4;
+    __pyx_t_4 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":330
+  /* "cvcf.pyx":330
  *         if error in self._ignored_errors: return
  *         errorlabel, errorstring = self._errors[error].split(':')
  *         if opt: errorstring = errorstring % opt             # <<<<<<<<<<<<<<
@@ -4874,100 +4899,100 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
  */
   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_2) {
-    __pyx_t_4 = PyNumber_Remainder(__pyx_v_errorstring, __pyx_v_opt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyNumber_Remainder(__pyx_v_errorstring, __pyx_v_opt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_v_errorstring);
-    __pyx_v_errorstring = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_errorstring = __pyx_t_3;
+    __pyx_t_3 = 0;
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":331
+  /* "cvcf.pyx":331
  *         errorlabel, errorstring = self._errors[error].split(':')
  *         if opt: errorstring = errorstring % opt
  *         errwarn = ["Error","Warning"][error in self._warn_errors]             # <<<<<<<<<<<<<<
  *         sys.stderr.write("Line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring))
  *         if error in self._warn_errors: return
  */
-  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Error));
-  PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__Error));
+  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__Error));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Error));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Warning));
-  PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__Warning));
+  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__Warning));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Warning));
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((PySequence_Contains(__pyx_t_1, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_4), __pyx_t_2, sizeof(int), __Pyx_PyBool_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = ((PySequence_Contains(__pyx_t_4, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_3), __pyx_t_2, sizeof(int), __Pyx_PyBool_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_v_errwarn);
-  __pyx_v_errwarn = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_errwarn = __pyx_t_4;
+  __pyx_t_4 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":332
+  /* "cvcf.pyx":332
  *         if opt: errorstring = errorstring % opt
  *         errwarn = ["Error","Warning"][error in self._warn_errors]
  *         sys.stderr.write("Line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring))             # <<<<<<<<<<<<<<
  *         if error in self._warn_errors: return
  *         raise ValueError(errorstring)
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_line);
-  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_line);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_line);
   __Pyx_GIVEREF(__pyx_v_line);
   __Pyx_INCREF(__pyx_v_errwarn);
-  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_errwarn);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_errwarn);
   __Pyx_GIVEREF(__pyx_v_errwarn);
   __Pyx_INCREF(__pyx_v_errorlabel);
-  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_errorlabel);
+  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_errorlabel);
   __Pyx_GIVEREF(__pyx_v_errorlabel);
   __Pyx_INCREF(__pyx_v_errorstring);
-  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_errorstring);
+  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_errorstring);
   __Pyx_GIVEREF(__pyx_v_errorstring);
-  __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__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 = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_25), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
-  __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __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;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":333
+  /* "cvcf.pyx":333
  *         errwarn = ["Error","Warning"][error in self._warn_errors]
  *         sys.stderr.write("Line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring))
  *         if error in self._warn_errors: return             # <<<<<<<<<<<<<<
  *         raise ValueError(errorstring)
  * 
  */
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_2 = ((PySequence_Contains(__pyx_t_4, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = ((PySequence_Contains(__pyx_t_3, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_2) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -4976,23 +5001,23 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":334
+  /* "cvcf.pyx":334
  *         sys.stderr.write("Line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring))
  *         if error in self._warn_errors: return
  *         raise ValueError(errorstring)             # <<<<<<<<<<<<<<
  * 
  *     def parse_format(self,line,format,filter=False):
  */
-  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   __Pyx_INCREF(__pyx_v_errorstring);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_errorstring);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_errorstring);
   __Pyx_GIVEREF(__pyx_v_errorstring);
-  __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_Raise(__pyx_t_3, 0, 0);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_Raise(__pyx_t_1, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -5013,7 +5038,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":336
+/* "cvcf.pyx":336
  *         raise ValueError(errorstring)
  * 
  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
@@ -5021,9 +5046,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_error(PyObject *__pyx_self, PyObject *__pyx
  *             if not format.startswith('<'):
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_parse_format = {__Pyx_NAMESTR("parse_format"), (PyCFunction)__pyx_pf_4cvcf_3VCF_parse_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_2parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_2parse_format = {__Pyx_NAMESTR("parse_format"), (PyCFunction)__pyx_pf_4cvcf_3VCF_2parse_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_2parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_format = 0;
@@ -5039,8 +5064,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_t_5;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
   Py_ssize_t __pyx_t_6;
   PyObject *__pyx_t_7 = NULL;
   int __pyx_t_8;
@@ -5054,7 +5079,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[4] = {0,0,0,0};
-    values[3] = __pyx_k_15;
+    values[3] = __pyx_k_26;
     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);
@@ -5094,7 +5119,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_v_format = values[2];
     __pyx_v_filter = values[3];
   } else {
-    __pyx_v_filter = __pyx_k_15;
+    __pyx_v_filter = __pyx_k_26;
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  4:
       __pyx_v_filter = PyTuple_GET_ITEM(__pyx_args, 3);
@@ -5115,7 +5140,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __Pyx_INCREF(__pyx_v_format);
-  __pyx_v_data = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_data = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_elts = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_first = Py_None; __Pyx_INCREF(Py_None);
@@ -5123,7 +5148,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __pyx_v_n = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":337
+  /* "cvcf.pyx":337
  * 
  *     def parse_format(self,line,format,filter=False):
  *         if self._version == 40:             # <<<<<<<<<<<<<<
@@ -5139,7 +5164,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":338
+    /* "cvcf.pyx":338
  *     def parse_format(self,line,format,filter=False):
  *         if self._version == 40:
  *             if not format.startswith('<'):             # <<<<<<<<<<<<<<
@@ -5148,117 +5173,105 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
     __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_16));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16));
-    __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_5 = (!__pyx_t_3);
-    if (__pyx_t_5) {
+    __pyx_t_4 = (!__pyx_t_3);
+    if (__pyx_t_4) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":339
+      /* "cvcf.pyx":339
  *         if self._version == 40:
  *             if not format.startswith('<'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)             # <<<<<<<<<<<<<<
  *                 format = "<"+format
  *             if not format.endswith('>'):
  */
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __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 = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_29); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __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;
+      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":340
+      /* "cvcf.pyx":340
  *             if not format.startswith('<'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  *                 format = "<"+format             # <<<<<<<<<<<<<<
  *             if not format.endswith('>'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  */
-      __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_s_16), __pyx_v_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_27), __pyx_v_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_v_format);
-      __pyx_v_format = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __pyx_v_format = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L7;
     }
     __pyx_L7:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":341
+    /* "cvcf.pyx":341
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  *                 format = "<"+format
  *             if not format.endswith('>'):             # <<<<<<<<<<<<<<
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  *                 format += ">"
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_18));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
-    __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_3 = (!__pyx_t_5);
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = (!__pyx_t_4);
     if (__pyx_t_3) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":342
+      /* "cvcf.pyx":342
  *                 format = "<"+format
  *             if not format.endswith('>'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)             # <<<<<<<<<<<<<<
  *                 format += ">"
  *             format = format[1:-1]
  */
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_17); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_29); 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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
       __Pyx_GIVEREF(__pyx_t_2);
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __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_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":343
+      /* "cvcf.pyx":343
  *             if not format.endswith('>'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  *                 format += ">"             # <<<<<<<<<<<<<<
  *             format = format[1:-1]
  *         data = {'id':None,'number':None,'type':None,'descr':None}
  */
-      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_format, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_format, ((PyObject *)__pyx_kp_s_30)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_v_format);
       __pyx_v_format = __pyx_t_2;
@@ -5267,14 +5280,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     }
     __pyx_L8:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":344
+    /* "cvcf.pyx":344
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  *                 format += ">"
  *             format = format[1:-1]             # <<<<<<<<<<<<<<
  *         data = {'id':None,'number':None,'type':None,'descr':None}
  *         idx = 0
  */
-    __pyx_t_2 = PySequence_GetSlice(__pyx_v_format, 1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_format, 1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_v_format);
     __pyx_v_format = __pyx_t_2;
@@ -5283,7 +5296,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":345
+  /* "cvcf.pyx":345
  *                 format += ">"
  *             format = format[1:-1]
  *         data = {'id':None,'number':None,'type':None,'descr':None}             # <<<<<<<<<<<<<<
@@ -5300,7 +5313,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __pyx_v_data = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":346
+  /* "cvcf.pyx":346
  *             format = format[1:-1]
  *         data = {'id':None,'number':None,'type':None,'descr':None}
  *         idx = 0             # <<<<<<<<<<<<<<
@@ -5311,7 +5324,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __Pyx_DECREF(__pyx_v_idx);
   __pyx_v_idx = __pyx_int_0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":347
+  /* "cvcf.pyx":347
  *         data = {'id':None,'number':None,'type':None,'descr':None}
  *         idx = 0
  *         while len(format.strip())>0:             # <<<<<<<<<<<<<<
@@ -5329,7 +5342,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_t_3 = (__pyx_t_6 > 0);
     if (!__pyx_t_3) break;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":348
+    /* "cvcf.pyx":348
  *         idx = 0
  *         while len(format.strip())>0:
  *             elts = format.strip().split(',')             # <<<<<<<<<<<<<<
@@ -5344,395 +5357,317 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __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 = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-    __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_elts);
-    __pyx_v_elts = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_elts = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":349
+    /* "cvcf.pyx":349
  *         while len(format.strip())>0:
  *             elts = format.strip().split(',')
  *             first, rest = elts[0], ','.join(elts[1:])             # <<<<<<<<<<<<<<
  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
  */
-    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__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_1 = PySequence_GetSlice(__pyx_v_elts, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_elts, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __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_7); __pyx_t_7 = 0;
+    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
     __Pyx_DECREF(__pyx_v_first);
-    __pyx_v_first = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_v_first = __pyx_t_2;
+    __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_rest);
-    __pyx_v_rest = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_rest = __pyx_t_5;
+    __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":350
+    /* "cvcf.pyx":350
  *             elts = format.strip().split(',')
  *             first, rest = elts[0], ','.join(elts[1:])
  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):             # <<<<<<<<<<<<<<
  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_8));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-    __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (!__pyx_t_3) {
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_19));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-      __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_5) {
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_8));
-        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-        __pyx_t_4 = PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-        PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_19));
-        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-        __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __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_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         __pyx_t_9 = __pyx_t_8;
       } else {
-        __pyx_t_9 = __pyx_t_5;
+        __pyx_t_9 = __pyx_t_4;
       }
-      __pyx_t_5 = __pyx_t_9;
+      __pyx_t_4 = __pyx_t_9;
     } else {
-      __pyx_t_5 = __pyx_t_3;
+      __pyx_t_4 = __pyx_t_3;
     }
-    if (__pyx_t_5) {
+    if (__pyx_t_4) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":351
+      /* "cvcf.pyx":351
  *             first, rest = elts[0], ','.join(elts[1:])
  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)             # <<<<<<<<<<<<<<
  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
  */
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_int_40, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, __pyx_int_40, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_5) {
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_20); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_4) {
+        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_38); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
+        __Pyx_GIVEREF(__pyx_t_5);
+        __pyx_t_5 = 0;
+        __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         goto __pyx_L12;
       }
       __pyx_L12:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":352
+      /* "cvcf.pyx":352
  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
  */
-      __pyx_t_7 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_4, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_5) {
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
-        __Pyx_GIVEREF(__pyx_t_4);
-        __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
         goto __pyx_L13;
       }
       __pyx_L13:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":353
+      /* "cvcf.pyx":353
  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *                 first = ["ID=","Number=","Type=","Description="][idx] + first             # <<<<<<<<<<<<<<
  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
  */
-      __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-      PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_22));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_23));
-      PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_kp_s_23));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
-      PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_kp_s_24));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
-      PyList_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_kp_s_25));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
-      __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_t_4), __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
+      PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_40));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
+      PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_41));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
+      PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_kp_s_42));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
+      PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_kp_s_43));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
+      __pyx_t_7 = PyObject_GetItem(((PyObject *)__pyx_t_2), __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_v_first); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-      __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_first); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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_7); __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_v_first);
-      __pyx_v_first = __pyx_t_4;
-      __pyx_t_4 = 0;
+      __pyx_v_first = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L11;
     }
     __pyx_L11:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":354
+    /* "cvcf.pyx":354
  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]             # <<<<<<<<<<<<<<
  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_22));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-    __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    if (__pyx_t_5) {
+    if (__pyx_t_4) {
       __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-      __pyx_t_4 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __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_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L14;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":355
+    /* "cvcf.pyx":355
  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]             # <<<<<<<<<<<<<<
  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
  *             elif first.startswith('Description='):
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_23));
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_23));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23));
-    __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    if (__pyx_t_5) {
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_4) {
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-      __pyx_t_2 = PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __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_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       goto __pyx_L14;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":356
+    /* "cvcf.pyx":356
  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]             # <<<<<<<<<<<<<<
  *             elif first.startswith('Description='):
  *                 elts = format.split('"')
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_24));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
-    __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    if (__pyx_t_5) {
+    if (__pyx_t_4) {
       __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-      __pyx_t_4 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __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_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L14;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":357
+    /* "cvcf.pyx":357
  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
  *             elif first.startswith('Description='):             # <<<<<<<<<<<<<<
  *                 elts = format.split('"')
  *                 if len(elts)<3:
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_25));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
-    __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    if (__pyx_t_5) {
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_4) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":358
+      /* "cvcf.pyx":358
  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
  *             elif first.startswith('Description='):
  *                 elts = format.split('"')             # <<<<<<<<<<<<<<
  *                 if len(elts)<3:
  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
  */
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_19));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-      __pyx_t_2 = PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __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_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_v_elts);
-      __pyx_v_elts = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_v_elts = __pyx_t_7;
+      __pyx_t_7 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":359
+      /* "cvcf.pyx":359
  *             elif first.startswith('Description='):
  *                 elts = format.split('"')
  *                 if len(elts)<3:             # <<<<<<<<<<<<<<
@@ -5740,130 +5675,118 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  *                     elts = first.split('=') + [rest]
  */
       __pyx_t_6 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = (__pyx_t_6 < 3);
-      if (__pyx_t_5) {
+      __pyx_t_4 = (__pyx_t_6 < 3);
+      if (__pyx_t_4) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":360
+        /* "cvcf.pyx":360
  *                 elts = format.split('"')
  *                 if len(elts)<3:
  *                     self.error(line,self.FORMAT_MISSING_QUOTES)             # <<<<<<<<<<<<<<
  *                     elts = first.split('=') + [rest]
  *                 data['descr'] = elts[1]
  */
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_26); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_52); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
-        __Pyx_GIVEREF(__pyx_t_4);
-        __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __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_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":361
+        /* "cvcf.pyx":361
  *                 if len(elts)<3:
  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
  *                     elts = first.split('=') + [rest]             # <<<<<<<<<<<<<<
  *                 data['descr'] = elts[1]
  *                 rest = '"'.join(elts[2:])
  */
-        __pyx_t_4 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-        PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_8));
-        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-        __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __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_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+        __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
         __Pyx_INCREF(__pyx_v_rest);
-        PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_rest);
+        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_rest);
         __Pyx_GIVEREF(__pyx_v_rest);
-        __pyx_t_4 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+        __pyx_t_7 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_v_elts);
-        __pyx_v_elts = __pyx_t_4;
-        __pyx_t_4 = 0;
+        __pyx_v_elts = __pyx_t_7;
+        __pyx_t_7 = 0;
         goto __pyx_L15;
       }
       __pyx_L15:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":362
+      /* "cvcf.pyx":362
  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
  *                     elts = first.split('=') + [rest]
  *                 data['descr'] = elts[1]             # <<<<<<<<<<<<<<
  *                 rest = '"'.join(elts[2:])
  *                 if rest.startswith(','): rest = rest[1:]
  */
-      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":363
+      /* "cvcf.pyx":363
  *                     elts = first.split('=') + [rest]
  *                 data['descr'] = elts[1]
  *                 rest = '"'.join(elts[2:])             # <<<<<<<<<<<<<<
  *                 if rest.startswith(','): rest = rest[1:]
  *             else:
  */
-      __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_19), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_7 = PySequence_GetSlice(__pyx_v_elts, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_34), __pyx_n_s__join); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_elts, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __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 = 0;
-      __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
       __Pyx_DECREF(__pyx_v_rest);
-      __pyx_v_rest = __pyx_t_7;
-      __pyx_t_7 = 0;
+      __pyx_v_rest = __pyx_t_2;
+      __pyx_t_2 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":364
+      /* "cvcf.pyx":364
  *                 data['descr'] = elts[1]
  *                 rest = '"'.join(elts[2:])
  *                 if rest.startswith(','): rest = rest[1:]             # <<<<<<<<<<<<<<
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  */
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_rest, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_rest, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-      __pyx_t_4 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_5) {
-        __pyx_t_4 = PySequence_GetSlice(__pyx_v_rest, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_rest, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
         __Pyx_DECREF(__pyx_v_rest);
-        __pyx_v_rest = __pyx_t_4;
-        __pyx_t_4 = 0;
+        __pyx_v_rest = __pyx_t_5;
+        __pyx_t_5 = 0;
         goto __pyx_L16;
       }
       __pyx_L16:;
@@ -5871,34 +5794,34 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":366
+      /* "cvcf.pyx":366
  *                 if rest.startswith(','): rest = rest[1:]
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *             format = rest
  *             idx += 1
  */
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
       __Pyx_GIVEREF(__pyx_t_2);
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __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_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     }
     __pyx_L14:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":367
+    /* "cvcf.pyx":367
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             format = rest             # <<<<<<<<<<<<<<
@@ -5909,7 +5832,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __Pyx_DECREF(__pyx_v_format);
     __pyx_v_format = __pyx_v_rest;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":368
+    /* "cvcf.pyx":368
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             format = rest
  *             idx += 1             # <<<<<<<<<<<<<<
@@ -5922,22 +5845,22 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_v_idx = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":369
+    /* "cvcf.pyx":369
  *             format = rest
  *             idx += 1
  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings             # <<<<<<<<<<<<<<
  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         if not data['descr']:
  */
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_5) {
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_4) {
       __pyx_t_2 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __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 = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_t_9 = __pyx_t_3;
     } else {
-      __pyx_t_9 = __pyx_t_5;
+      __pyx_t_9 = __pyx_t_4;
     }
     if (__pyx_t_9) {
       __Pyx_INCREF(__pyx_int_3);
@@ -5948,7 +5871,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_L17:;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":370
+  /* "cvcf.pyx":370
  *             idx += 1
  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
@@ -5959,30 +5882,30 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_5 = (!__pyx_t_9);
-  if (__pyx_t_5) {
+  __pyx_t_4 = (!__pyx_t_9);
+  if (__pyx_t_4) {
     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
     __Pyx_GIVEREF(__pyx_t_7);
     __pyx_t_7 = 0;
-    __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     goto __pyx_L18;
   }
   __pyx_L18:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":371
+  /* "cvcf.pyx":371
  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         if not data['descr']:             # <<<<<<<<<<<<<<
@@ -5991,12 +5914,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
   __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_t_9 = (!__pyx_t_5);
+  __pyx_t_9 = (!__pyx_t_4);
   if (__pyx_t_9) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":372
+    /* "cvcf.pyx":372
  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         if not data['descr']:
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
@@ -6005,59 +5928,59 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
-    __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+    __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":373
+    /* "cvcf.pyx":373
  *         if not data['descr']:
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             data['descr'] = '<none>'             # <<<<<<<<<<<<<<
  *         if not data['type'] and not data['number']:
  *             # fine, ##filter format
  */
-    if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr), ((PyObject *)__pyx_kp_s_27)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr), ((PyObject *)__pyx_kp_s_55)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L19;
   }
   __pyx_L19:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":374
+  /* "cvcf.pyx":374
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             data['descr'] = '<none>'
  *         if not data['type'] and not data['number']:             # <<<<<<<<<<<<<<
  *             # fine, ##filter format
  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
  */
-  __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __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 = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_5 = (!__pyx_t_9);
-  if (__pyx_t_5) {
-    __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __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 = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_4 = (!__pyx_t_9);
+  if (__pyx_t_4) {
+    __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_t_3 = (!__pyx_t_9);
     __pyx_t_9 = __pyx_t_3;
   } else {
-    __pyx_t_9 = __pyx_t_5;
+    __pyx_t_9 = __pyx_t_4;
   }
   if (__pyx_t_9) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":376
+    /* "cvcf.pyx":376
  *         if not data['type'] and not data['number']:
  *             # fine, ##filter format
  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')             # <<<<<<<<<<<<<<
@@ -6065,8 +5988,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6074,7 +5997,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
@@ -6087,16 +6010,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag));
     PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_10, 5, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+    PyTuple_SET_ITEM(__pyx_t_10, 5, ((PyObject *)__pyx_kp_s_9));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
     __pyx_t_2 = 0;
     __pyx_t_7 = 0;
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __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_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
@@ -6104,7 +6027,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   }
   __pyx_L20:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":377
+  /* "cvcf.pyx":377
  *             # fine, ##filter format
  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
  *         if not data['type'] in ["Integer","Float","Character","String","Flag"]:             # <<<<<<<<<<<<<<
@@ -6117,8 +6040,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __Pyx_GOTREF(__pyx_t_10);
   __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_5 = __pyx_t_9;
-  if (!__pyx_t_5) {
+  __pyx_t_4 = __pyx_t_9;
+  if (!__pyx_t_4) {
     __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
     __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6126,19 +6049,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_t_3 = __pyx_t_9;
     __pyx_t_9 = __pyx_t_3;
   } else {
-    __pyx_t_9 = __pyx_t_5;
+    __pyx_t_9 = __pyx_t_4;
   }
   if (!__pyx_t_9) {
     __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Character), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_3 = __pyx_t_5;
-    __pyx_t_5 = __pyx_t_3;
+    __pyx_t_3 = __pyx_t_4;
+    __pyx_t_4 = __pyx_t_3;
   } else {
-    __pyx_t_5 = __pyx_t_9;
+    __pyx_t_4 = __pyx_t_9;
   }
-  if (!__pyx_t_5) {
+  if (!__pyx_t_4) {
     __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__String), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
     __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6146,23 +6069,23 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_t_3 = __pyx_t_9;
     __pyx_t_9 = __pyx_t_3;
   } else {
-    __pyx_t_9 = __pyx_t_5;
+    __pyx_t_9 = __pyx_t_4;
   }
   if (!__pyx_t_9) {
     __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Flag), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_3 = __pyx_t_5;
-    __pyx_t_5 = __pyx_t_3;
+    __pyx_t_3 = __pyx_t_4;
+    __pyx_t_4 = __pyx_t_3;
   } else {
-    __pyx_t_5 = __pyx_t_9;
+    __pyx_t_4 = __pyx_t_9;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_9 = (!__pyx_t_5);
+  __pyx_t_9 = (!__pyx_t_4);
   if (__pyx_t_9) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":378
+    /* "cvcf.pyx":378
  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
  *         if not data['type'] in ["Integer","Float","Character","String","Flag"]:
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
@@ -6171,26 +6094,26 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10);
     __Pyx_GIVEREF(__pyx_t_10);
     __pyx_t_10 = 0;
-    __pyx_t_10 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     goto __pyx_L21;
   }
   __pyx_L21:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":380
+  /* "cvcf.pyx":380
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         # I would like a missing-value field, but it isn't there
  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value             # <<<<<<<<<<<<<<
@@ -6199,41 +6122,41 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
   __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_4 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __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 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_5 = __pyx_t_9;
-  if (!__pyx_t_5) {
-    __pyx_t_4 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __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 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_4 = __pyx_t_9;
+  if (!__pyx_t_4) {
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_t_3 = __pyx_t_9;
     __pyx_t_9 = __pyx_t_3;
   } else {
-    __pyx_t_9 = __pyx_t_5;
+    __pyx_t_9 = __pyx_t_4;
   }
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_5 = __pyx_t_9;
-  if (__pyx_t_5) {
+  __pyx_t_4 = __pyx_t_9;
+  if (__pyx_t_4) {
     if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L22;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":381
+    /* "cvcf.pyx":381
  *         # I would like a missing-value field, but it isn't there
  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value
  *         else:                                   data['missing'] = '.'             # <<<<<<<<<<<<<<
  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         try:
  */
-    if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing), ((PyObject *)__pyx_kp_s_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing), ((PyObject *)__pyx_kp_s_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_L22:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":382
+  /* "cvcf.pyx":382
  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value
  *         else:                                   data['missing'] = '.'
  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
@@ -6242,32 +6165,32 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
   __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_9 = (!__pyx_t_5);
+  __pyx_t_9 = (!__pyx_t_4);
   if (__pyx_t_9) {
     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
-    __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+    __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     goto __pyx_L23;
   }
   __pyx_L23:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":383
+  /* "cvcf.pyx":383
  *         else:                                   data['missing'] = '.'
  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         try:             # <<<<<<<<<<<<<<
@@ -6282,39 +6205,39 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __Pyx_XGOTREF(__pyx_save_exc_tb);
     /*try:*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":384
+      /* "cvcf.pyx":384
  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         try:
  *             n = int(data['number'])             # <<<<<<<<<<<<<<
  *             t = self.NT_NUMBER
  *         except ValueError:
  */
-      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
+      __Pyx_GOTREF(__pyx_t_5);
       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
-      __Pyx_GIVEREF(__pyx_t_4);
-      __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __pyx_t_5 = 0;
+      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_v_n);
-      __pyx_v_n = __pyx_t_4;
-      __pyx_t_4 = 0;
+      __pyx_v_n = __pyx_t_5;
+      __pyx_t_5 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":385
+      /* "cvcf.pyx":385
  *         try:
  *             n = int(data['number'])
  *             t = self.NT_NUMBER             # <<<<<<<<<<<<<<
  *         except ValueError:
  *             n = -1
  */
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
+      __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_v_t);
-      __pyx_v_t = __pyx_t_4;
-      __pyx_t_4 = 0;
+      __pyx_v_t = __pyx_t_5;
+      __pyx_t_5 = 0;
     }
     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
     __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
@@ -6325,9 +6248,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":386
+    /* "cvcf.pyx":386
  *             n = int(data['number'])
  *             t = self.NT_NUMBER
  *         except ValueError:             # <<<<<<<<<<<<<<
@@ -6337,12 +6260,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
     if (__pyx_t_11) {
       __Pyx_AddTraceback("cvcf.VCF.parse_format");
-      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+      __Pyx_GOTREF(__pyx_t_5);
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_GOTREF(__pyx_t_10);
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":387
+      /* "cvcf.pyx":387
  *             t = self.NT_NUMBER
  *         except ValueError:
  *             n = -1             # <<<<<<<<<<<<<<
@@ -6353,7 +6276,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
       __Pyx_DECREF(__pyx_v_n);
       __pyx_v_n = __pyx_int_neg_1;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":388
+      /* "cvcf.pyx":388
  *         except ValueError:
  *             n = -1
  *             if data['number'] == '.':                   t = self.NT_UNKNOWN             # <<<<<<<<<<<<<<
@@ -6362,7 +6285,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
@@ -6376,7 +6299,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
         goto __pyx_L34;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":389
+      /* "cvcf.pyx":389
  *             n = -1
  *             if data['number'] == '.':                   t = self.NT_UNKNOWN
  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES             # <<<<<<<<<<<<<<
@@ -6385,7 +6308,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
       __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_28), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_56), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
@@ -6399,7 +6322,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
         goto __pyx_L34;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":390
+      /* "cvcf.pyx":390
  *             if data['number'] == '.':                   t = self.NT_UNKNOWN
  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES             # <<<<<<<<<<<<<<
@@ -6408,7 +6331,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_29), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_57), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
@@ -6422,7 +6345,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
         goto __pyx_L34;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":391
+      /* "cvcf.pyx":391
  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES             # <<<<<<<<<<<<<<
@@ -6431,7 +6354,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
       __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_30), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_58), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
@@ -6445,7 +6368,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
         goto __pyx_L34;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":392
+      /* "cvcf.pyx":392
  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES             # <<<<<<<<<<<<<<
@@ -6454,7 +6377,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_31), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_59), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
@@ -6469,7 +6392,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":394
+        /* "cvcf.pyx":394
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
@@ -6478,24 +6401,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  */
         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_39); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
         __Pyx_GOTREF(__pyx_t_7);
         __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
-        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_12));
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_7);
         __Pyx_GIVEREF(__pyx_t_7);
         __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+        __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
         __Pyx_GOTREF(__pyx_t_7);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       }
       __pyx_L34:;
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       goto __pyx_L25_exception_handled;
@@ -6514,7 +6437,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
     __pyx_L31_try_end:;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":395
+  /* "cvcf.pyx":395
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])             # <<<<<<<<<<<<<<
@@ -6526,14 +6449,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __Pyx_GOTREF(__pyx_t_10);
   __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
   __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
   __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_v_t);
@@ -6542,20 +6465,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __Pyx_INCREF(__pyx_v_n);
   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_n);
   __Pyx_GIVEREF(__pyx_v_n);
-  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_7);
   __Pyx_GIVEREF(__pyx_t_7);
   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_12);
   __Pyx_GIVEREF(__pyx_t_12);
   __pyx_t_1 = 0;
-  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
   __pyx_t_7 = 0;
   __pyx_t_12 = 0;
-  __pyx_t_12 = PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_12;
   __pyx_t_12 = 0;
   goto __pyx_L0;
@@ -6565,7 +6488,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   __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_10);
   __Pyx_XDECREF(__pyx_t_12);
@@ -6585,7 +6508,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":398
+/* "cvcf.pyx":398
  * 
  * 
  *     def format_format( self, fmt, filter=False ):             # <<<<<<<<<<<<<<
@@ -6593,9 +6516,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_format(PyObject *__pyx_self, PyObject
  *         if fmt.number != None and not filter:
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_format_format = {__Pyx_NAMESTR("format_format"), (PyCFunction)__pyx_pf_4cvcf_3VCF_format_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_3format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_3format_format = {__Pyx_NAMESTR("format_format"), (PyCFunction)__pyx_pf_4cvcf_3VCF_3format_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_3format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_fmt = 0;
   PyObject *__pyx_v_filter = 0;
@@ -6623,7 +6546,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[3] = {0,0,0};
-    values[2] = __pyx_k_32;
+    values[2] = __pyx_k_60;
     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);
@@ -6655,7 +6578,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_v_fmt = values[1];
     __pyx_v_filter = values[2];
   } else {
-    __pyx_v_filter = __pyx_k_32;
+    __pyx_v_filter = __pyx_k_60;
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  3:
       __pyx_v_filter = PyTuple_GET_ITEM(__pyx_args, 2);
@@ -6674,13 +6597,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_v_values = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_values = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_nmb = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_format = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":399
+  /* "cvcf.pyx":399
  * 
  *     def format_format( self, fmt, filter=False ):
  *         values = [('ID',fmt.id)]             # <<<<<<<<<<<<<<
@@ -6690,7 +6613,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __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 = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__ID));
   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__ID));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID));
@@ -6699,14 +6622,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   __pyx_t_1 = 0;
   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
+  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
   __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_v_values));
   __pyx_v_values = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":400
+  /* "cvcf.pyx":400
  *     def format_format( self, fmt, filter=False ):
  *         values = [('ID',fmt.id)]
  *         if fmt.number != None and not filter:             # <<<<<<<<<<<<<<
@@ -6729,7 +6652,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   }
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":401
+    /* "cvcf.pyx":401
  *         values = [('ID',fmt.id)]
  *         if fmt.number != None and not filter:
  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."             # <<<<<<<<<<<<<<
@@ -6747,13 +6670,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     if (__pyx_t_4) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
       __Pyx_DECREF(__pyx_v_nmb);
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_6);
+      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_9);
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":402
+    /* "cvcf.pyx":402
  *         if fmt.number != None and not filter:
  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)             # <<<<<<<<<<<<<<
@@ -6774,20 +6697,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
       __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
       __Pyx_GIVEREF(__pyx_t_2);
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_v_nmb);
       __pyx_v_nmb = __pyx_t_2;
       __pyx_t_2 = 0;
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":403
+    /* "cvcf.pyx":403
  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"             # <<<<<<<<<<<<<<
@@ -6805,13 +6728,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     if (__pyx_t_4) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_56));
       __Pyx_DECREF(__pyx_v_nmb);
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_28);
+      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_56);
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":404
+    /* "cvcf.pyx":404
  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"             # <<<<<<<<<<<<<<
@@ -6829,13 +6752,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     if (__pyx_t_4) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_57));
       __Pyx_DECREF(__pyx_v_nmb);
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_29);
+      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_57);
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":405
+    /* "cvcf.pyx":405
  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
  *             elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"             # <<<<<<<<<<<<<<
@@ -6853,13 +6776,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     if (__pyx_t_4) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_30));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_58));
       __Pyx_DECREF(__pyx_v_nmb);
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_30);
+      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_58);
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":406
+    /* "cvcf.pyx":406
  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
  *             elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"
  *             elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"             # <<<<<<<<<<<<<<
@@ -6877,14 +6800,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     if (__pyx_t_4) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_59));
       __Pyx_DECREF(__pyx_v_nmb);
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_31);
+      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_59);
       goto __pyx_L7;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":408
+      /* "cvcf.pyx":408
  *             elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"
  *             else:
  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)             # <<<<<<<<<<<<<<
@@ -6893,24 +6816,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
  */
       __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_33), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_61), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
       __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
       __Pyx_Raise(__pyx_t_1, 0, 0);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __pyx_L7:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":409
+    /* "cvcf.pyx":409
  *             else:
  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
  *             values.append( ('Number',nmb) )             # <<<<<<<<<<<<<<
@@ -6921,17 +6844,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     __Pyx_INCREF(((PyObject *)__pyx_n_s__Number));
     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Number));
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Number));
     __Pyx_INCREF(__pyx_v_nmb);
     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nmb);
     __Pyx_GIVEREF(__pyx_v_nmb);
-    __pyx_t_7 = PyList_Append(((PyObject *)__pyx_v_values), __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_7 = PyList_Append(__pyx_v_values, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":410
+    /* "cvcf.pyx":410
  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
  *             values.append( ('Number',nmb) )
  *             values.append( ('Type', fmt.type) )             # <<<<<<<<<<<<<<
@@ -6944,20 +6867,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __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 = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(((PyObject *)__pyx_n_s__Type));
     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Type));
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Type));
     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_1 = 0;
-    __pyx_t_7 = PyList_Append(((PyObject *)__pyx_v_values), __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_7 = PyList_Append(__pyx_v_values, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":411
+  /* "cvcf.pyx":411
  *             values.append( ('Number',nmb) )
  *             values.append( ('Type', fmt.type) )
  *         values.append( ('Description', '"' + fmt.description + '"') )             # <<<<<<<<<<<<<<
@@ -6969,24 +6892,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   }
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_s_19), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_s_34), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __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_t_1, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Description));
   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Description));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Description));
   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_7 = PyList_Append(((PyObject *)__pyx_v_values), __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_7 = PyList_Append(__pyx_v_values, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":412
+  /* "cvcf.pyx":412
  *             values.append( ('Type', fmt.type) )
  *         values.append( ('Description', '"' + fmt.description + '"') )
  *         if self._version == 33:             # <<<<<<<<<<<<<<
@@ -7002,7 +6925,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":413
+    /* "cvcf.pyx":413
  *         values.append( ('Description', '"' + fmt.description + '"') )
  *         if self._version == 33:
  *             format = ",".join([v for k,v in values])             # <<<<<<<<<<<<<<
@@ -7013,11 +6936,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    if (likely(((PyObject *)__pyx_v_values) != Py_None)) {
-      __pyx_t_8 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_6);
-    } else {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_v_values == Py_None)) {
+      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
+    __pyx_t_8 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_6);
     for (;;) {
       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
       __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++;
@@ -7053,15 +6975,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     }
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
     __Pyx_INCREF(((PyObject *)__pyx_t_1));
     PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __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_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_v_format);
     __pyx_v_format = __pyx_t_1;
     __pyx_t_1 = 0;
@@ -7069,7 +6991,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":415
+    /* "cvcf.pyx":415
  *             format = ",".join([v for k,v in values])
  *         else:
  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"             # <<<<<<<<<<<<<<
@@ -7080,11 +7002,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-    if (likely(((PyObject *)__pyx_v_values) != Py_None)) {
-      __pyx_t_8 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_2);
-    } else {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_v_values == Py_None)) {
+      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
+    __pyx_t_8 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_2);
     for (;;) {
       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
       __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++;
@@ -7117,34 +7038,34 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
         __pyx_t_10 = 0;
       }
       __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
       __Pyx_INCREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
       __Pyx_INCREF(__pyx_v_v);
       PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_62), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
       if (unlikely(PyList_Append(__pyx_t_6, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
     }
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(((PyObject *)__pyx_t_6));
     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __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_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_16), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_27), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_kp_s_30)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_format);
@@ -7153,7 +7074,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":416
+  /* "cvcf.pyx":416
  *         else:
  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"
  *         return format             # <<<<<<<<<<<<<<
@@ -7188,7 +7109,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":418
+/* "cvcf.pyx":418
  *         return format
  * 
  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
@@ -7196,9 +7117,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_format(PyObject *__pyx_self, PyObjec
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_get_expected = {__Pyx_NAMESTR("get_expected"), (PyCFunction)__pyx_pf_4cvcf_3VCF_get_expected, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_4get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_4get_expected = {__Pyx_NAMESTR("get_expected"), (PyCFunction)__pyx_pf_4cvcf_3VCF_4get_expected, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_4get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_format = 0;
   PyObject *__pyx_v_formatdict = 0;
@@ -7274,7 +7195,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_fmt = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":419
+  /* "cvcf.pyx":419
  * 
  *     def get_expected(self, format, formatdict, alt):
  *         fmt = formatdict[format]             # <<<<<<<<<<<<<<
@@ -7287,7 +7208,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   __pyx_v_fmt = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":420
+  /* "cvcf.pyx":420
  *     def get_expected(self, format, formatdict, alt):
  *         fmt = formatdict[format]
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1             # <<<<<<<<<<<<<<
@@ -7313,7 +7234,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":421
+  /* "cvcf.pyx":421
  *         fmt = formatdict[format]
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number             # <<<<<<<<<<<<<<
@@ -7341,7 +7262,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":422
+  /* "cvcf.pyx":422
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number
  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1             # <<<<<<<<<<<<<<
@@ -7370,7 +7291,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":423
+  /* "cvcf.pyx":423
  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number
  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)             # <<<<<<<<<<<<<<
@@ -7399,7 +7320,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":424
+  /* "cvcf.pyx":424
  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2             # <<<<<<<<<<<<<<
@@ -7429,7 +7350,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   }
   __pyx_L10:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":425
+  /* "cvcf.pyx":425
  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
  *         if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)             # <<<<<<<<<<<<<<
@@ -7459,7 +7380,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   }
   __pyx_L11:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":426
+  /* "cvcf.pyx":426
  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
  *         if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)
  *         return 0             # <<<<<<<<<<<<<<
@@ -7486,7 +7407,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":429
+/* "cvcf.pyx":429
  * 
  * 
  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
@@ -7494,9 +7415,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_get_expected(PyObject *__pyx_self, PyObject
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF__add_definition = {__Pyx_NAMESTR("_add_definition"), (PyCFunction)__pyx_pf_4cvcf_3VCF__add_definition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_5_add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_5_add_definition = {__Pyx_NAMESTR("_add_definition"), (PyCFunction)__pyx_pf_4cvcf_3VCF_5_add_definition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_5_add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_formatdict = 0;
   PyObject *__pyx_v_key = 0;
@@ -7579,7 +7500,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __pyx_L4_argument_unpacking_done:;
   __Pyx_INCREF(__pyx_v_data);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":430
+  /* "cvcf.pyx":430
  * 
  *     def _add_definition(self, formatdict, key, data, line ):
  *         if key in formatdict: return             # <<<<<<<<<<<<<<
@@ -7595,7 +7516,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":431
+  /* "cvcf.pyx":431
  *     def _add_definition(self, formatdict, key, data, line ):
  *         if key in formatdict: return
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)             # <<<<<<<<<<<<<<
@@ -7607,7 +7528,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_UNKNOWN_KEY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
   __Pyx_INCREF(__pyx_v_line);
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_line);
   __Pyx_GIVEREF(__pyx_v_line);
@@ -7617,13 +7538,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_key);
   __Pyx_GIVEREF(__pyx_v_key);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":432
+  /* "cvcf.pyx":432
  *         if key in formatdict: return
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  *         if data == None:             # <<<<<<<<<<<<<<
@@ -7636,7 +7557,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":433
+    /* "cvcf.pyx":433
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  *         if data == None:
  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")             # <<<<<<<<<<<<<<
@@ -7648,7 +7569,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
@@ -7660,21 +7581,21 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
     __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag));
     PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__Flag));
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_35));
-    PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_35));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_35));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
+    PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_63));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+    PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_s_9));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
     __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":434
+    /* "cvcf.pyx":434
  *         if data == None:
  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
  *             return             # <<<<<<<<<<<<<<
@@ -7688,7 +7609,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":435
+  /* "cvcf.pyx":435
  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
  *             return
  *         if data == []: data = [""]             # unsure what type -- say string             # <<<<<<<<<<<<<<
@@ -7715,7 +7636,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   }
   __pyx_L8:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":436
+  /* "cvcf.pyx":436
  *             return
  *         if data == []: data = [""]             # unsure what type -- say string
  *         if type(data[0]) == type(0.0):             # <<<<<<<<<<<<<<
@@ -7734,7 +7655,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":437
+    /* "cvcf.pyx":437
  *         if data == []: data = [""]             # unsure what type -- say string
  *         if type(data[0]) == type(0.0):
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)             # <<<<<<<<<<<<<<
@@ -7746,7 +7667,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
@@ -7758,21 +7679,21 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
     __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
     PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__Float));
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_35));
-    PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_35));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_35));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
+    PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_63));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
     __Pyx_INCREF(Py_None);
     PyTuple_SET_ITEM(__pyx_t_2, 5, Py_None);
     __Pyx_GIVEREF(Py_None);
     __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":438
+    /* "cvcf.pyx":438
  *         if type(data[0]) == type(0.0):
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
  *             return             # <<<<<<<<<<<<<<
@@ -7786,7 +7707,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":439
+  /* "cvcf.pyx":439
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
  *             return
  *         if type(data[0]) == type(0):             # <<<<<<<<<<<<<<
@@ -7802,7 +7723,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_1) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":440
+    /* "cvcf.pyx":440
  *             return
  *         if type(data[0]) == type(0):
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)             # <<<<<<<<<<<<<<
@@ -7814,7 +7735,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
@@ -7826,21 +7747,21 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
     __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
     PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__Integer));
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_35));
-    PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_35));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_35));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
+    PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_63));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
     __Pyx_INCREF(Py_None);
     PyTuple_SET_ITEM(__pyx_t_3, 5, Py_None);
     __Pyx_GIVEREF(Py_None);
     __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":441
+    /* "cvcf.pyx":441
  *         if type(data[0]) == type(0):
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
  *             return             # <<<<<<<<<<<<<<
@@ -7854,7 +7775,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   }
   __pyx_L10:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":442
+  /* "cvcf.pyx":442
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
  *             return
  *         formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".")             # <<<<<<<<<<<<<<
@@ -7866,7 +7787,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_key);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
   __Pyx_GIVEREF(__pyx_v_key);
@@ -7878,17 +7799,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
   PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__String));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_35));
-  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_35));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_35));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-  PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_s_6));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
+  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_63));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+  PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_s_9));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
@@ -7907,7 +7828,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":446
+/* "cvcf.pyx":446
  * 
  *     # todo: trim trailing missing values
  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):             # <<<<<<<<<<<<<<
@@ -7915,9 +7836,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF__add_definition(PyObject *__pyx_self, PyObj
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_format_formatdata = {__Pyx_NAMESTR("format_formatdata"), (PyCFunction)__pyx_pf_4cvcf_3VCF_format_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_6format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_6format_formatdata = {__Pyx_NAMESTR("format_formatdata"), (PyCFunction)__pyx_pf_4cvcf_3VCF_6format_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_6format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_data = 0;
   PyObject *__pyx_v_format = 0;
@@ -7949,9 +7870,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[6] = {0,0,0,0,0,0};
-    values[3] = __pyx_k_36;
-    values[4] = __pyx_k_37;
-    values[5] = ((PyObject *)__pyx_kp_s_3);
+    values[3] = __pyx_k_64;
+    values[4] = __pyx_k_65;
+    values[5] = ((PyObject *)__pyx_kp_s_4);
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
       case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
@@ -8005,9 +7926,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_v_value = values[4];
     __pyx_v_separator = values[5];
   } else {
-    __pyx_v_key = __pyx_k_36;
-    __pyx_v_value = __pyx_k_37;
-    __pyx_v_separator = ((PyObject *)__pyx_kp_s_3);
+    __pyx_v_key = __pyx_k_64;
+    __pyx_v_value = __pyx_k_65;
+    __pyx_v_separator = ((PyObject *)__pyx_kp_s_4);
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  6:
       __pyx_v_separator = PyTuple_GET_ITEM(__pyx_args, 5);
@@ -8032,15 +7953,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __Pyx_INCREF(__pyx_v_data);
-  __pyx_v_output = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
-  __pyx_v_sdata = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
-  __pyx_v_d = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_output = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_sdata = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_d = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_last = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":447
+  /* "cvcf.pyx":447
  *     # todo: trim trailing missing values
  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):
  *         output, sdata = [], []             # <<<<<<<<<<<<<<
@@ -8058,7 +7979,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   __pyx_v_sdata = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":448
+  /* "cvcf.pyx":448
  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):
  *         output, sdata = [], []
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values             # <<<<<<<<<<<<<<
@@ -8074,7 +7995,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":449
+    /* "cvcf.pyx":449
  *         output, sdata = [], []
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  *             d = {}             # <<<<<<<<<<<<<<
@@ -8087,7 +8008,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_v_d = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":450
+    /* "cvcf.pyx":450
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  *             d = {}
  *             for k in data: d[k] = []             # <<<<<<<<<<<<<<
@@ -8125,7 +8046,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     }
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":451
+    /* "cvcf.pyx":451
  *             d = {}
  *             for k in data: d[k] = []
  *             data = d             # <<<<<<<<<<<<<<
@@ -8139,7 +8060,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":453
+  /* "cvcf.pyx":453
  *             data = d
  *         # convert missing values; and silently add definitions if required
  *         for k in data:             # <<<<<<<<<<<<<<
@@ -8171,7 +8092,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_v_k = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":454
+    /* "cvcf.pyx":454
  *         # convert missing values; and silently add definitions if required
  *         for k in data:
  *             self._add_definition( format, k, data[k], "(output)" )             # <<<<<<<<<<<<<<
@@ -8183,7 +8104,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_t_5 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
     __Pyx_INCREF(__pyx_v_format);
     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_format);
     __Pyx_GIVEREF(__pyx_v_format);
@@ -8192,17 +8113,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __Pyx_GIVEREF(__pyx_v_k);
     PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
     __Pyx_GIVEREF(__pyx_t_5);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
-    PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_kp_s_38));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
+    PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_kp_s_66));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
     __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":455
+    /* "cvcf.pyx":455
  *         for k in data:
  *             self._add_definition( format, k, data[k], "(output)" )
  *             for idx,v in enumerate(data[k]):             # <<<<<<<<<<<<<<
@@ -8247,7 +8168,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
       __pyx_t_5 = __pyx_t_6;
       __pyx_t_6 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":456
+      /* "cvcf.pyx":456
  *             self._add_definition( format, k, data[k], "(output)" )
  *             for idx,v in enumerate(data[k]):
  *                 if v == format[k].missingvalue: data[k][idx] = "."             # <<<<<<<<<<<<<<
@@ -8267,7 +8188,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
       if (__pyx_t_3) {
         __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
-        if (PyObject_SetItem(__pyx_t_6, __pyx_v_idx, ((PyObject *)__pyx_kp_s_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (PyObject_SetItem(__pyx_t_6, __pyx_v_idx, ((PyObject *)__pyx_kp_s_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
         goto __pyx_L13;
       }
@@ -8278,7 +8199,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":458
+  /* "cvcf.pyx":458
  *                 if v == format[k].missingvalue: data[k][idx] = "."
  *         # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
  *         for k in data:             # <<<<<<<<<<<<<<
@@ -8310,7 +8231,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_v_k = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":459
+    /* "cvcf.pyx":459
  *         # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
  *         for k in data:
  *             if k != 'GT': sdata.append( (k,data[k]) )             # <<<<<<<<<<<<<<
@@ -8328,22 +8249,22 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
       __pyx_t_5 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
       __Pyx_INCREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
       __Pyx_GIVEREF(__pyx_t_5);
       __pyx_t_5 = 0;
-      __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_sdata), __pyx_t_2); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_9 = PyList_Append(__pyx_v_sdata, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
       goto __pyx_L16;
     }
     __pyx_L16:;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":460
+  /* "cvcf.pyx":460
  *         for k in data:
  *             if k != 'GT': sdata.append( (k,data[k]) )
  *         sdata.sort()             # <<<<<<<<<<<<<<
@@ -8355,7 +8276,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   }
   __pyx_t_9 = PyList_Sort(((PyObject *)__pyx_v_sdata)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":461
+  /* "cvcf.pyx":461
  *             if k != 'GT': sdata.append( (k,data[k]) )
  *         sdata.sort()
  *         if 'GT' in data:             # <<<<<<<<<<<<<<
@@ -8365,7 +8286,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   __pyx_t_3 = ((PySequence_Contains(__pyx_v_data, ((PyObject *)__pyx_n_s__GT)))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":462
+    /* "cvcf.pyx":462
  *         sdata.sort()
  *         if 'GT' in data:
  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata             # <<<<<<<<<<<<<<
@@ -8377,18 +8298,18 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_1 = 0;
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_map, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_5), NULL); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_INCREF(((PyObject *)__pyx_n_s__GT));
     PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__GT));
     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT));
@@ -8397,8 +8318,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_t_2 = 0;
     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-    __Pyx_GIVEREF(__pyx_t_5);
+    PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
     __pyx_t_5 = 0;
     __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_sdata)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_5));
@@ -8410,18 +8331,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   }
   __pyx_L17:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":463
+  /* "cvcf.pyx":463
  *         if 'GT' in data:
  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
  *         for k,v in sdata:             # <<<<<<<<<<<<<<
  *             if v == []: v = None
  *             if key and value:
  */
-  if (likely(((PyObject *)__pyx_v_sdata) != Py_None)) {
-    __pyx_t_4 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_sdata); __Pyx_INCREF(__pyx_t_5);
-  } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(__pyx_v_sdata == Py_None)) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
   }
+  __pyx_t_4 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_sdata); __Pyx_INCREF(__pyx_t_5);
   for (;;) {
     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
     __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
@@ -8454,7 +8374,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
       __pyx_t_6 = 0;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":464
+    /* "cvcf.pyx":464
  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
  *         for k,v in sdata:
  *             if v == []: v = None             # <<<<<<<<<<<<<<
@@ -8476,7 +8396,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     }
     __pyx_L20:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":465
+    /* "cvcf.pyx":465
  *         for k,v in sdata:
  *             if v == []: v = None
  *             if key and value:             # <<<<<<<<<<<<<<
@@ -8492,7 +8412,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     }
     if (__pyx_t_11) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":466
+      /* "cvcf.pyx":466
  *             if v == []: v = None
  *             if key and value:
  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )             # <<<<<<<<<<<<<<
@@ -8507,41 +8427,41 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
         if (unlikely(__pyx_v_output == Py_None)) {
           PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
         }
-        __pyx_t_6 = PyNumber_Add(__pyx_v_k, ((PyObject *)__pyx_kp_s_8)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyNumber_Add(__pyx_v_k, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
         __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
         __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)&PyString_Type)));
-        __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+        __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+        __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
         __Pyx_INCREF(__pyx_v_v);
         PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v);
         __Pyx_GIVEREF(__pyx_v_v);
-        __pyx_t_8 = PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __pyx_t_1 = PyTuple_New(1); 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);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
         __Pyx_GIVEREF(__pyx_t_8);
         __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_8);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_t_8); 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);
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_output), __pyx_t_1); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         goto __pyx_L22;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":467
+        /* "cvcf.pyx":467
  *             if key and value:
  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )
  *                 else: output.append( k )             # <<<<<<<<<<<<<<
@@ -8551,13 +8471,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
         if (unlikely(__pyx_v_output == Py_None)) {
           PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
         }
-        __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_output), __pyx_v_k); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       __pyx_L22:;
       goto __pyx_L21;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":468
+    /* "cvcf.pyx":468
  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )
  *                 else: output.append( k )
  *             elif key: output.append(k)             # <<<<<<<<<<<<<<
@@ -8569,11 +8489,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
       if (unlikely(__pyx_v_output == Py_None)) {
         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
-      __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_output), __pyx_v_k); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L21;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":469
+    /* "cvcf.pyx":469
  *                 else: output.append( k )
  *             elif key: output.append(k)
  *             elif value:             # <<<<<<<<<<<<<<
@@ -8583,7 +8503,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_11) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":470
+      /* "cvcf.pyx":470
  *             elif key: output.append(k)
  *             elif value:
  *                 if v != None: output.append( ','.join(map(str,v)) )             # <<<<<<<<<<<<<<
@@ -8601,32 +8521,32 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
         __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
         __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-        PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)((PyObject*)&PyString_Type)));
-        __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
+        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+        __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+        PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+        __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
         __Pyx_INCREF(__pyx_v_v);
         PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_v);
         __Pyx_GIVEREF(__pyx_v_v);
-        __pyx_t_6 = PyObject_Call(__pyx_builtin_map, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
         __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
         PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
         __Pyx_GIVEREF(__pyx_t_6);
         __pyx_t_6 = 0;
-        __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __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_8); __pyx_t_8 = 0;
-        __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_output), __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+        __pyx_t_9 = PyList_Append(__pyx_v_output, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
         goto __pyx_L23;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":471
+        /* "cvcf.pyx":471
  *             elif value:
  *                 if v != None: output.append( ','.join(map(str,v)) )
  *                 else: output.append( "." )                    # should not happen             # <<<<<<<<<<<<<<
@@ -8636,7 +8556,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
         if (unlikely(__pyx_v_output == Py_None)) {
           PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
         }
-        __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_output), ((PyObject *)__pyx_kp_s_6)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyList_Append(__pyx_v_output, ((PyObject *)__pyx_kp_s_9)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       __pyx_L23:;
       goto __pyx_L21;
@@ -8645,7 +8565,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":473
+  /* "cvcf.pyx":473
  *                 else: output.append( "." )                    # should not happen
  *         # snip off trailing missing data
  *         while len(output) > 1:             # <<<<<<<<<<<<<<
@@ -8660,7 +8580,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_t_11 = (__pyx_t_4 > 1);
     if (!__pyx_t_11) break;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":474
+    /* "cvcf.pyx":474
  *         # snip off trailing missing data
  *         while len(output) > 1:
  *             last = output[-1].replace(',','').replace('.','')             # <<<<<<<<<<<<<<
@@ -8672,38 +8592,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-    PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-    __pyx_t_8 = PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); 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_6); __pyx_t_6 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__replace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-    PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_kp_s_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-    __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_v_last);
-    __pyx_v_last = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_last = __pyx_t_5;
+    __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":475
+    /* "cvcf.pyx":475
  *         while len(output) > 1:
  *             last = output[-1].replace(',','').replace('.','')
  *             if len(last)>0: break             # <<<<<<<<<<<<<<
@@ -8718,22 +8620,22 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
     }
     __pyx_L26:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":476
+    /* "cvcf.pyx":476
  *             last = output[-1].replace(',','').replace('.','')
  *             if len(last)>0: break
  *             output = output[:-1]             # <<<<<<<<<<<<<<
  *         return separator.join(output)
  * 
  */
-    __pyx_t_6 = PySequence_GetSlice(((PyObject *)__pyx_v_output), 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+    __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_output), 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_DECREF(((PyObject *)__pyx_v_output));
-    __pyx_v_output = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_v_output = __pyx_t_5;
+    __pyx_t_5 = 0;
   }
   __pyx_L25_break:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":477
+  /* "cvcf.pyx":477
  *             if len(last)>0: break
  *             output = output[:-1]
  *         return separator.join(output)             # <<<<<<<<<<<<<<
@@ -8741,19 +8643,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
  * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_6 = PyObject_GetAttr(__pyx_v_separator, __pyx_n_s__join); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
+  __pyx_t_5 = PyObject_GetAttr(__pyx_v_separator, __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
   __Pyx_INCREF(((PyObject *)__pyx_v_output));
-  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_output));
+  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_output));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
-  __pyx_t_5 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_r = __pyx_t_5;
-  __pyx_t_5 = 0;
+  __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  __pyx_r = __pyx_t_8;
+  __pyx_t_8 = 0;
   goto __pyx_L0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -8780,7 +8682,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":480
+/* "cvcf.pyx":480
  * 
  * 
  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
@@ -8788,9 +8690,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_format_formatdata(PyObject *__pyx_self, PyO
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_enter_default_format = {__Pyx_NAMESTR("enter_default_format"), (PyCFunction)__pyx_pf_4cvcf_3VCF_enter_default_format, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_4cvcf_3VCF_7enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_7enter_default_format = {__Pyx_NAMESTR("enter_default_format"), (PyCFunction)__pyx_pf_4cvcf_3VCF_7enter_default_format, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_7enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_v_f;
   PyObject *__pyx_r = NULL;
   Py_ssize_t __pyx_t_1;
@@ -8806,7 +8708,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_self = __pyx_self;
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":481
+  /* "cvcf.pyx":481
  * 
  *     def enter_default_format(self):
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
@@ -8818,7 +8720,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_t_4 = PyTuple_New(6); 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_GOTREF(((PyObject *)__pyx_t_4));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__GT));
   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__GT));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT));
@@ -8833,16 +8735,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Genotype));
   PyTuple_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_n_s__Genotype));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Genotype));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-  PyTuple_SET_ITEM(__pyx_t_4, 5, ((PyObject *)__pyx_kp_s_6));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+  PyTuple_SET_ITEM(__pyx_t_4, 5, ((PyObject *)__pyx_kp_s_9));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":482
+  /* "cvcf.pyx":482
  *     def enter_default_format(self):
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),             # <<<<<<<<<<<<<<
@@ -8854,7 +8756,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__GQ));
   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__GQ));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GQ));
@@ -8866,19 +8768,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
   PyTuple_SET_ITEM(__pyx_t_5, 3, ((PyObject *)__pyx_n_s__Integer));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
-  PyTuple_SET_ITEM(__pyx_t_5, 4, ((PyObject *)__pyx_kp_s_39));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_69));
+  PyTuple_SET_ITEM(__pyx_t_5, 4, ((PyObject *)__pyx_kp_s_69));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_69));
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":483
+  /* "cvcf.pyx":483
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),             # <<<<<<<<<<<<<<
@@ -8890,7 +8792,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__DP));
   PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__DP));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DP));
@@ -8902,19 +8804,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
   PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_n_s__Integer));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
-  PyTuple_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_kp_s_40));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_70));
+  PyTuple_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_kp_s_70));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70));
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":484
+  /* "cvcf.pyx":484
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid             # <<<<<<<<<<<<<<
@@ -8926,7 +8828,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__HQ));
   PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__HQ));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HQ));
@@ -8938,19 +8840,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
   PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_n_s__Integer));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
-  PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_kp_s_41));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_71));
+  PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_kp_s_71));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_71));
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":485
+  /* "cvcf.pyx":485
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.')]:             # <<<<<<<<<<<<<<
@@ -8962,7 +8864,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__FT));
   PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_n_s__FT));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FT));
@@ -8974,17 +8876,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
   PyTuple_SET_ITEM(__pyx_t_8, 3, ((PyObject *)__pyx_n_s__String));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
-  PyTuple_SET_ITEM(__pyx_t_8, 4, ((PyObject *)__pyx_kp_s_42));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-  PyTuple_SET_ITEM(__pyx_t_8, 5, ((PyObject *)__pyx_kp_s_6));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_72));
+  PyTuple_SET_ITEM(__pyx_t_8, 4, ((PyObject *)__pyx_kp_s_72));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+  PyTuple_SET_ITEM(__pyx_t_8, 5, ((PyObject *)__pyx_kp_s_9));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
   __pyx_t_6 = 0;
-  __pyx_t_6 = PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
   __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_8));
   PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
@@ -9002,15 +8904,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   __pyx_t_4 = 0;
   __pyx_t_5 = 0;
   __pyx_t_6 = 0;
-  if (likely(((PyObject *)__pyx_t_8) != Py_None)) {
-    __pyx_t_1 = 0; __pyx_t_6 = ((PyObject *)__pyx_t_8); __Pyx_INCREF(__pyx_t_6);
-  } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_t_1 = 0; __pyx_t_6 = ((PyObject *)__pyx_t_8); __Pyx_INCREF(__pyx_t_6);
   __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
   for (;;) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":481
+    /* "cvcf.pyx":481
  * 
  *     def enter_default_format(self):
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
@@ -9023,7 +8921,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
     __pyx_v_f = __pyx_t_8;
     __pyx_t_8 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":486
+    /* "cvcf.pyx":486
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.')]:
  *             if f.id not in self._format:             # <<<<<<<<<<<<<<
@@ -9039,7 +8937,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_9) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":487
+      /* "cvcf.pyx":487
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.')]:
  *             if f.id not in self._format:
  *                 self._format[f.id] = f             # <<<<<<<<<<<<<<
@@ -9078,7 +8976,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":489
+/* "cvcf.pyx":489
  *                 self._format[f.id] = f
  * 
  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
@@ -9086,9 +8984,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_enter_default_format(PyObject *__pyx_self,
  *         elts = line[2:].split('=')
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_parse_header = {__Pyx_NAMESTR("parse_header"), (PyCFunction)__pyx_pf_4cvcf_3VCF_parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_8parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_8parse_header = {__Pyx_NAMESTR("parse_header"), (PyCFunction)__pyx_pf_4cvcf_3VCF_8parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_8parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_elts;
@@ -9098,8 +8996,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,0};
   __Pyx_RefNannySetupContext("parse_header");
@@ -9149,134 +9047,122 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":490
+  /* "cvcf.pyx":490
  * 
  *     def parse_header( self, line ):
  *         assert line.startswith('##')             # <<<<<<<<<<<<<<
  *         elts = line[2:].split('=')
  *         key = elts[0].strip()
  */
-  #ifndef PYREX_WITHOUT_ASSERTIONS
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_43));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
   __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 = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (unlikely(!__pyx_t_4)) {
+  if (unlikely(!__pyx_t_3)) {
     PyErr_SetNone(PyExc_AssertionError);
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   #endif
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":491
+  /* "cvcf.pyx":491
  *     def parse_header( self, line ):
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')             # <<<<<<<<<<<<<<
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()
  */
-  __pyx_t_3 = PySequence_GetSlice(__pyx_v_line, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_line, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __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 = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_8));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __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_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_v_elts);
-  __pyx_v_elts = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_elts = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":492
+  /* "cvcf.pyx":492
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')
  *         key = elts[0].strip()             # <<<<<<<<<<<<<<
  *         value = '='.join(elts[1:]).strip()
  *         if key == "fileformat":
  */
-  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_v_key);
-  __pyx_v_key = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_key = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":493
+  /* "cvcf.pyx":493
  *         elts = line[2:].split('=')
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()             # <<<<<<<<<<<<<<
  *         if key == "fileformat":
  *             if value == "VCFv3.3":
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_8), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PySequence_GetSlice(__pyx_v_elts, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_elts, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strip); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __Pyx_DECREF(__pyx_v_value);
-  __pyx_v_value = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_v_value = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":494
+  /* "cvcf.pyx":494
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()
  *         if key == "fileformat":             # <<<<<<<<<<<<<<
  *             if value == "VCFv3.3":
  *                 self._version = 33
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__fileformat), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_4) {
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__fileformat), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __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 = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":495
+    /* "cvcf.pyx":495
  *         value = '='.join(elts[1:]).strip()
  *         if key == "fileformat":
  *             if value == "VCFv3.3":             # <<<<<<<<<<<<<<
  *                 self._version = 33
  *             elif value == "VCFv4.0":
  */
-    __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_44), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (__pyx_t_4) {
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_76), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __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 = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":496
+      /* "cvcf.pyx":496
  *         if key == "fileformat":
  *             if value == "VCFv3.3":
  *                 self._version = 33             # <<<<<<<<<<<<<<
@@ -9287,20 +9173,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":497
+    /* "cvcf.pyx":497
  *             if value == "VCFv3.3":
  *                 self._version = 33
  *             elif value == "VCFv4.0":             # <<<<<<<<<<<<<<
  *                 self._version = 40
  *             elif value == "VCFv4.1":
  */
-    __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_45), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (__pyx_t_4) {
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_77), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __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 = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":498
+      /* "cvcf.pyx":498
  *                 self._version = 33
  *             elif value == "VCFv4.0":
  *                 self._version = 40             # <<<<<<<<<<<<<<
@@ -9311,20 +9197,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
       goto __pyx_L7;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":499
+    /* "cvcf.pyx":499
  *             elif value == "VCFv4.0":
  *                 self._version = 40
  *             elif value == "VCFv4.1":             # <<<<<<<<<<<<<<
  *                 # AH - for testing
  *                 self._version = 40
  */
-    __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_46), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (__pyx_t_4) {
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_78), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __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 = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":501
+      /* "cvcf.pyx":501
  *             elif value == "VCFv4.1":
  *                 # AH - for testing
  *                 self._version = 40             # <<<<<<<<<<<<<<
@@ -9336,136 +9222,136 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":503
+      /* "cvcf.pyx":503
  *                 self._version = 40
  *             else:
  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *         elif key == "INFO":
  *             f = self.parse_format(line, value)
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_47); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_79); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     }
     __pyx_L7:;
     goto __pyx_L6;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":504
+  /* "cvcf.pyx":504
  *             else:
  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
  *         elif key == "INFO":             # <<<<<<<<<<<<<<
  *             f = self.parse_format(line, value)
  *             self._info[ f.id ] = f
  */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__INFO), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __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 = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_4) {
+  __pyx_t_4 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__INFO), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":505
+    /* "cvcf.pyx":505
  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
  *         elif key == "INFO":
  *             f = self.parse_format(line, value)             # <<<<<<<<<<<<<<
  *             self._info[ f.id ] = f
  *         elif key == "FILTER":
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
     __Pyx_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_v_f = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":506
+    /* "cvcf.pyx":506
  *         elif key == "INFO":
  *             f = self.parse_format(line, value)
  *             self._info[ f.id ] = f             # <<<<<<<<<<<<<<
  *         elif key == "FILTER":
  *             f = self.parse_format(line, value, filter=True)
  */
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); 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);
-    if (PyObject_SetItem(__pyx_t_3, __pyx_t_1, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     goto __pyx_L6;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":507
+  /* "cvcf.pyx":507
  *             f = self.parse_format(line, value)
  *             self._info[ f.id ] = f
  *         elif key == "FILTER":             # <<<<<<<<<<<<<<
  *             f = self.parse_format(line, value, filter=True)
  *             self._filter[ f.id ] = f
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_4) {
+  __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":508
+    /* "cvcf.pyx":508
  *             self._info[ f.id ] = f
  *         elif key == "FILTER":
  *             f = self.parse_format(line, value, filter=True)             # <<<<<<<<<<<<<<
  *             self._filter[ f.id ] = f
  *         elif key == "FORMAT":
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
     __Pyx_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
     __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__filter), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__filter), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __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_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
     __Pyx_DECREF(__pyx_v_f);
     __pyx_v_f = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":509
+    /* "cvcf.pyx":509
  *         elif key == "FILTER":
  *             f = self.parse_format(line, value, filter=True)
  *             self._filter[ f.id ] = f             # <<<<<<<<<<<<<<
@@ -9474,71 +9360,71 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
  */
     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    if (PyObject_SetItem(__pyx_t_5, __pyx_t_2, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (PyObject_SetItem(__pyx_t_5, __pyx_t_4, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     goto __pyx_L6;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":510
+  /* "cvcf.pyx":510
  *             f = self.parse_format(line, value, filter=True)
  *             self._filter[ f.id ] = f
  *         elif key == "FORMAT":             # <<<<<<<<<<<<<<
  *             f = self.parse_format(line, value)
  *             self._format[ f.id ] = f
  */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__FORMAT), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __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 = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_4) {
+  __pyx_t_4 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__FORMAT), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":511
+    /* "cvcf.pyx":511
  *             self._filter[ f.id ] = f
  *         elif key == "FORMAT":
  *             f = self.parse_format(line, value)             # <<<<<<<<<<<<<<
  *             self._format[ f.id ] = f
  *         else:
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
     __Pyx_INCREF(__pyx_v_value);
     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_v_f = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":512
+    /* "cvcf.pyx":512
  *         elif key == "FORMAT":
  *             f = self.parse_format(line, value)
  *             self._format[ f.id ] = f             # <<<<<<<<<<<<<<
  *         else:
  *             # keep other keys in the header field
  */
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_5 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    if (PyObject_SetItem(__pyx_t_3, __pyx_t_5, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     goto __pyx_L6;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":515
+    /* "cvcf.pyx":515
  *         else:
  *             # keep other keys in the header field
  *             self._header.append( (key,value) )             # <<<<<<<<<<<<<<
@@ -9547,19 +9433,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
  */
     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     __Pyx_INCREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
     __Pyx_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_t_5, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   }
   __pyx_L6:;
 
@@ -9568,7 +9454,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
   __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("cvcf.VCF.parse_header");
   __pyx_r = NULL;
@@ -9582,7 +9468,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":518
+/* "cvcf.pyx":518
  * 
  * 
  *     def write_header( self, stream ):             # <<<<<<<<<<<<<<
@@ -9590,9 +9476,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_header(PyObject *__pyx_self, PyObject
  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_write_header = {__Pyx_NAMESTR("write_header"), (PyCFunction)__pyx_pf_4cvcf_3VCF_write_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_9write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_9write_header = {__Pyx_NAMESTR("write_header"), (PyCFunction)__pyx_pf_4cvcf_3VCF_9write_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_9write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_key;
@@ -9659,7 +9545,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   __pyx_v_label = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":519
+  /* "cvcf.pyx":519
  * 
  *     def write_header( self, stream ):
  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))             # <<<<<<<<<<<<<<
@@ -9679,28 +9565,28 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
   __Pyx_GIVEREF(__pyx_t_4);
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_80), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__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 = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
   __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":520
+  /* "cvcf.pyx":520
  *     def write_header( self, stream ):
  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))             # <<<<<<<<<<<<<<
@@ -9762,30 +9648,30 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
     __pyx_t_4 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
     __Pyx_INCREF(__pyx_v_value);
     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_81), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":521
+  /* "cvcf.pyx":521
  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
  *         for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:             # <<<<<<<<<<<<<<
@@ -9795,7 +9681,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __Pyx_INCREF(((PyObject *)__pyx_n_s__INFO));
@@ -9805,7 +9691,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __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 = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __Pyx_INCREF(((PyObject *)__pyx_n_s__FILTER));
@@ -9815,7 +9701,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
@@ -9824,20 +9710,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   __pyx_t_2 = 0;
   __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
+  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
   __pyx_t_1 = 0;
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  if (likely(((PyObject *)__pyx_t_2) != Py_None)) {
-    __pyx_t_5 = 0; __pyx_t_4 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_4);
-  } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_t_5 = 0; __pyx_t_4 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_4);
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   for (;;) {
     if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
@@ -9871,7 +9753,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
       __pyx_t_1 = 0;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":522
+    /* "cvcf.pyx":522
  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
  *         for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:
  *             for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER"))))             # <<<<<<<<<<<<<<
@@ -9913,7 +9795,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
       __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
       __Pyx_INCREF(__pyx_v_f);
       PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
@@ -9923,31 +9805,31 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
       __Pyx_GOTREF(__pyx_t_9);
       if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__filter), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = PyEval_CallObjectWithKeywords(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
       __Pyx_INCREF(__pyx_v_label);
       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_label);
       __Pyx_GIVEREF(__pyx_v_label);
       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
       __Pyx_GIVEREF(__pyx_t_9);
       __pyx_t_9 = 0;
-      __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_81), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
       __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
       PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_9));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
       __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     }
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -9977,7 +9859,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":525
+/* "cvcf.pyx":525
  * 
  * 
  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
@@ -9985,9 +9867,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_header(PyObject *__pyx_self, PyObject
  *         assert not line.startswith('##')
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_parse_heading = {__Pyx_NAMESTR("parse_heading"), (PyCFunction)__pyx_pf_4cvcf_3VCF_parse_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_10parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_10parse_heading = {__Pyx_NAMESTR("parse_heading"), (PyCFunction)__pyx_pf_4cvcf_3VCF_10parse_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_10parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_headings;
@@ -9999,11 +9881,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
+  int __pyx_t_3;
+  Py_ssize_t __pyx_t_4;
+  int __pyx_t_5;
   int __pyx_t_6;
-  int __pyx_t_7;
+  PyObject *__pyx_t_7 = NULL;
   Py_ssize_t __pyx_t_8;
   PyObject *__pyx_t_9 = NULL;
   PyObject *__pyx_t_10 = NULL;
@@ -10057,160 +9939,142 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
   __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_y = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":526
+  /* "cvcf.pyx":526
  * 
  *     def parse_heading( self, line ):
  *         assert line.startswith('#')             # <<<<<<<<<<<<<<
  *         assert not line.startswith('##')
  *         headings = line[1:].split('\t')
  */
-  #ifndef PYREX_WITHOUT_ASSERTIONS
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_50));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_50));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_50));
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
   __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 = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (unlikely(!__pyx_t_4)) {
+  if (unlikely(!__pyx_t_3)) {
     PyErr_SetNone(PyExc_AssertionError);
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   #endif
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":527
+  /* "cvcf.pyx":527
  *     def parse_heading( self, line ):
  *         assert line.startswith('#')
  *         assert not line.startswith('##')             # <<<<<<<<<<<<<<
  *         headings = line[1:].split('\t')
  *         if len(headings)==1 and len(line[1:].split()) >= 9:
  */
-  #ifndef PYREX_WITHOUT_ASSERTIONS
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_43));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (unlikely(!(!__pyx_t_4))) {
+  if (unlikely(!(!__pyx_t_3))) {
     PyErr_SetNone(PyExc_AssertionError);
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   #endif
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":528
+  /* "cvcf.pyx":528
  *         assert line.startswith('#')
  *         assert not line.startswith('##')
  *         headings = line[1:].split('\t')             # <<<<<<<<<<<<<<
  *         if len(headings)==1 and len(line[1:].split()) >= 9:
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
  */
-  __pyx_t_1 = PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __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 = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_51));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_51));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_51));
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_v_headings);
-  __pyx_v_headings = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_v_headings = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":529
+  /* "cvcf.pyx":529
  *         assert not line.startswith('##')
  *         headings = line[1:].split('\t')
  *         if len(headings)==1 and len(line[1:].split()) >= 9:             # <<<<<<<<<<<<<<
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
  *             headings = line[1:].split()
  */
-  __pyx_t_5 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = (__pyx_t_5 == 1);
-  if (__pyx_t_4) {
-    __pyx_t_3 = PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = (__pyx_t_4 == 1);
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_6 = (__pyx_t_5 >= 9);
-    __pyx_t_7 = __pyx_t_6;
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_5 = (__pyx_t_4 >= 9);
+    __pyx_t_6 = __pyx_t_5;
   } else {
-    __pyx_t_7 = __pyx_t_4;
+    __pyx_t_6 = __pyx_t_3;
   }
-  if (__pyx_t_7) {
+  if (__pyx_t_6) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":530
+    /* "cvcf.pyx":530
  *         headings = line[1:].split('\t')
  *         if len(headings)==1 and len(line[1:].split()) >= 9:
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)             # <<<<<<<<<<<<<<
  *             headings = line[1:].split()
  * 
  */
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_52); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __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 = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_87); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":531
+    /* "cvcf.pyx":531
  *         if len(headings)==1 and len(line[1:].split()) >= 9:
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
  *             headings = line[1:].split()             # <<<<<<<<<<<<<<
  * 
  *         for i,s in enumerate(self._required):
  */
-    __pyx_t_1 = PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     __Pyx_DECREF(__pyx_v_headings);
-    __pyx_v_headings = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_headings = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":533
+  /* "cvcf.pyx":533
  *             headings = line[1:].split()
  * 
  *         for i,s in enumerate(self._required):             # <<<<<<<<<<<<<<
@@ -10218,44 +10082,44 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
  *             if len(headings)<=i or headings[i] != s:
  */
   __Pyx_INCREF(__pyx_int_0);
-  __pyx_t_1 = __pyx_int_0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___required); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-    __pyx_t_5 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
+  __pyx_t_2 = __pyx_int_0;
+  __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___required); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
+    __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __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_7); __pyx_t_7 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_3))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+    if (likely(PyList_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
     } else {
-      __pyx_t_2 = PyIter_Next(__pyx_t_3);
-      if (!__pyx_t_2) {
+      __pyx_t_7 = PyIter_Next(__pyx_t_1);
+      if (!__pyx_t_7) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_7);
     }
     __Pyx_DECREF(__pyx_v_s);
-    __pyx_v_s = __pyx_t_2;
-    __pyx_t_2 = 0;
-    __Pyx_INCREF(__pyx_t_1);
+    __pyx_v_s = __pyx_t_7;
+    __pyx_t_7 = 0;
+    __Pyx_INCREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_v_i);
-    __pyx_v_i = __pyx_t_1;
-    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1);
-    __pyx_t_1 = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_v_i = __pyx_t_2;
+    __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_2);
+    __pyx_t_2 = __pyx_t_7;
+    __pyx_t_7 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":535
+    /* "cvcf.pyx":535
  *         for i,s in enumerate(self._required):
  * 
  *             if len(headings)<=i or headings[i] != s:             # <<<<<<<<<<<<<<
@@ -10263,28 +10127,28 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
  *                 if len(headings) <= i:
  */
     __pyx_t_8 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_v_i, Py_LE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    if (!__pyx_t_7) {
+    if (!__pyx_t_6) {
       __pyx_t_9 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, __pyx_v_s, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_9, __pyx_v_s, Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_6 = __pyx_t_4;
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_5 = __pyx_t_3;
     } else {
-      __pyx_t_6 = __pyx_t_7;
+      __pyx_t_5 = __pyx_t_6;
     }
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":537
+      /* "cvcf.pyx":537
  *             if len(headings)<=i or headings[i] != s:
  * 
  *                 if len(headings) <= i:             # <<<<<<<<<<<<<<
@@ -10292,16 +10156,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
  *                 else:
  */
       __pyx_t_8 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_v_i, Py_LE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      if (__pyx_t_6) {
+      if (__pyx_t_5) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":538
+        /* "cvcf.pyx":538
  * 
  *                 if len(headings) <= i:
  *                     err = "(%sth entry not found)" % (i+1)             # <<<<<<<<<<<<<<
@@ -10310,43 +10174,43 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
  */
         __pyx_t_9 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_88), __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_v_err);
-        __pyx_v_err = ((PyObject *)__pyx_t_2);
-        __pyx_t_2 = 0;
+        __pyx_v_err = ((PyObject *)__pyx_t_7);
+        __pyx_t_7 = 0;
         goto __pyx_L10;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":540
+        /* "cvcf.pyx":540
  *                     err = "(%sth entry not found)" % (i+1)
  *                 else:
  *                     err = "(found %s, expected %s)" % (headings[i],s)             # <<<<<<<<<<<<<<
  * 
  *                 #self.error(line,self.BADLY_FORMATTED_HEADING,err)
  */
-        __pyx_t_2 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
         __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
+        __Pyx_GIVEREF(__pyx_t_7);
         __Pyx_INCREF(__pyx_v_s);
         PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_s);
         __Pyx_GIVEREF(__pyx_v_s);
-        __pyx_t_2 = 0;
-        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_7 = 0;
+        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_89), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_v_err);
-        __pyx_v_err = ((PyObject *)__pyx_t_2);
-        __pyx_t_2 = 0;
+        __pyx_v_err = ((PyObject *)__pyx_t_7);
+        __pyx_t_7 = 0;
       }
       __pyx_L10:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":545
+      /* "cvcf.pyx":545
  * 
  *                 # allow FORMAT column to be absent
  *                 if len(headings) == 8:             # <<<<<<<<<<<<<<
@@ -10354,36 +10218,36 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
  *                 else:
  */
       __pyx_t_8 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = (__pyx_t_8 == 8);
-      if (__pyx_t_6) {
+      __pyx_t_5 = (__pyx_t_8 == 8);
+      if (__pyx_t_5) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":546
+        /* "cvcf.pyx":546
  *                 # allow FORMAT column to be absent
  *                 if len(headings) == 8:
  *                     headings.append("FORMAT")             # <<<<<<<<<<<<<<
  *                 else:
  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)
  */
-        __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_headings, ((PyObject *)__pyx_n_s__FORMAT)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_headings, ((PyObject *)__pyx_n_s__FORMAT)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
         goto __pyx_L11;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":548
+        /* "cvcf.pyx":548
  *                     headings.append("FORMAT")
  *                 else:
  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)             # <<<<<<<<<<<<<<
  * 
  *         self._samples = headings[9:]
  */
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_55); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_90); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
         __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
@@ -10393,10 +10257,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
         PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_err);
         __Pyx_GIVEREF(__pyx_v_err);
         __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __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_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       }
       __pyx_L11:;
@@ -10404,48 +10268,48 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
     }
     __pyx_L9:;
   }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":550
+  /* "cvcf.pyx":550
  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)
  * 
  *         self._samples = headings[9:]             # <<<<<<<<<<<<<<
  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
  * 
  */
-  __pyx_t_1 = PySequence_GetSlice(__pyx_v_headings, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_headings, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":551
+  /* "cvcf.pyx":551
  * 
  *         self._samples = headings[9:]
  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )             # <<<<<<<<<<<<<<
  * 
  *     def write_heading( self, stream ):
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_0);
-  __pyx_t_3 = __pyx_int_0;
+  __pyx_t_1 = __pyx_int_0;
   __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
   if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
-    __pyx_t_5 = 0; __pyx_t_10 = __pyx_t_9; __Pyx_INCREF(__pyx_t_10);
+    __pyx_t_4 = 0; __pyx_t_10 = __pyx_t_9; __Pyx_INCREF(__pyx_t_10);
   } else {
-    __pyx_t_5 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
   }
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   for (;;) {
     if (likely(PyList_CheckExact(__pyx_t_10))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_10)) break;
-      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_10)) break;
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++;
     } else if (likely(PyTuple_CheckExact(__pyx_t_10))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
-      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++;
     } else {
       __pyx_t_9 = PyIter_Next(__pyx_t_10);
       if (!__pyx_t_9) {
@@ -10457,47 +10321,47 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
     __Pyx_DECREF(__pyx_v_y);
     __pyx_v_y = __pyx_t_9;
     __pyx_t_9 = 0;
-    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_3;
-    __pyx_t_9 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_x = __pyx_t_1;
+    __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_3);
-    __pyx_t_3 = __pyx_t_9;
+    __Pyx_DECREF(__pyx_t_1);
+    __pyx_t_1 = __pyx_t_9;
     __pyx_t_9 = 0;
     __pyx_t_9 = PyNumber_Add(__pyx_v_x, __pyx_int_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
     __Pyx_INCREF(__pyx_v_y);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_y);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_y);
     __Pyx_GIVEREF(__pyx_v_y);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
     __Pyx_GIVEREF(__pyx_t_9);
     __pyx_t_9 = 0;
-    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
   }
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_t_1));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___sample2column, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_INCREF(((PyObject *)__pyx_t_2));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___sample2column, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_9);
   __Pyx_XDECREF(__pyx_t_10);
   __Pyx_AddTraceback("cvcf.VCF.parse_heading");
@@ -10514,7 +10378,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":553
+/* "cvcf.pyx":553
  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
  * 
  *     def write_heading( self, stream ):             # <<<<<<<<<<<<<<
@@ -10522,9 +10386,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_heading(PyObject *__pyx_self, PyObjec
  * 
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_write_heading = {__Pyx_NAMESTR("write_heading"), (PyCFunction)__pyx_pf_4cvcf_3VCF_write_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_11write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_11write_heading = {__Pyx_NAMESTR("write_heading"), (PyCFunction)__pyx_pf_4cvcf_3VCF_11write_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_11write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_r = NULL;
@@ -10577,7 +10441,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObjec
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":554
+  /* "cvcf.pyx":554
  * 
  *     def write_heading( self, stream ):
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")             # <<<<<<<<<<<<<<
@@ -10586,7 +10450,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObjec
  */
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_51), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_85), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___required); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
@@ -10597,29 +10461,29 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObjec
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
   __Pyx_GIVEREF(__pyx_t_5);
   __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_s_50), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_s_82), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_s_91)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
   __Pyx_GIVEREF(__pyx_t_5);
   __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __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_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -10638,7 +10502,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":556
+/* "cvcf.pyx":556
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
  * 
  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
@@ -10646,9 +10510,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_heading(PyObject *__pyx_self, PyObjec
  *         try:
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_convertGT = {__Pyx_NAMESTR("convertGT"), (PyCFunction)__pyx_pf_4cvcf_3VCF_convertGT, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_12convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_12convertGT = {__Pyx_NAMESTR("convertGT"), (PyCFunction)__pyx_pf_4cvcf_3VCF_12convertGT, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_12convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_GTstring = 0;
   PyObject *__pyx_v_gts;
@@ -10711,14 +10575,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_gts = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":557
+  /* "cvcf.pyx":557
  * 
  *     def convertGT(self, GTstring):
  *         if GTstring == ".": return ["."]             # <<<<<<<<<<<<<<
  *         try:
  *             gts = gtsRegEx.split(GTstring)
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_GTstring, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_GTstring, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __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 = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -10726,9 +10590,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
     __Pyx_XDECREF(__pyx_r);
     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-    PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+    PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_9));
+    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
     __pyx_r = ((PyObject *)__pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L0;
@@ -10736,7 +10600,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":558
+  /* "cvcf.pyx":558
  *     def convertGT(self, GTstring):
  *         if GTstring == ".": return ["."]
  *         try:             # <<<<<<<<<<<<<<
@@ -10751,7 +10615,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
     __Pyx_XGOTREF(__pyx_save_exc_tb);
     /*try:*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":559
+      /* "cvcf.pyx":559
  *         if GTstring == ".": return ["."]
  *         try:
  *             gts = gtsRegEx.split(GTstring)             # <<<<<<<<<<<<<<
@@ -10764,19 +10628,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __Pyx_GOTREF(__pyx_t_3);
       __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 = 559; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       __Pyx_INCREF(__pyx_v_GTstring);
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_GTstring);
       __Pyx_GIVEREF(__pyx_v_GTstring);
-      __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_4);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_v_gts);
       __pyx_v_gts = __pyx_t_4;
       __pyx_t_4 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":560
+      /* "cvcf.pyx":560
  *         try:
  *             gts = gtsRegEx.split(GTstring)
  *             if len(gts) == 1: return [int(gts[0])]             # <<<<<<<<<<<<<<
@@ -10790,13 +10654,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
         __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
-        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
         __Pyx_GIVEREF(__pyx_t_4);
         __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
@@ -10809,7 +10673,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       }
       __pyx_L15:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":561
+      /* "cvcf.pyx":561
  *             gts = gtsRegEx.split(GTstring)
  *             if len(gts) == 1: return [int(gts[0])]
  *             if len(gts) != 2: raise ValueError()             # <<<<<<<<<<<<<<
@@ -10828,7 +10692,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       }
       __pyx_L16:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":562
+      /* "cvcf.pyx":562
  *             if len(gts) == 1: return [int(gts[0])]
  *             if len(gts) != 2: raise ValueError()
  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]             # <<<<<<<<<<<<<<
@@ -10837,7 +10701,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
  */
       __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_4);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
@@ -10845,7 +10709,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       if (__pyx_t_2) {
         __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+        __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
         __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
@@ -10866,7 +10730,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
         __Pyx_GOTREF(__pyx_t_4);
         __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __pyx_t_4 = PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_5, (-__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+        __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_5, (-__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
         __Pyx_GOTREF(__pyx_t_3);
@@ -10888,7 +10752,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       }
       __pyx_L17:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":563
+      /* "cvcf.pyx":563
  *             if len(gts) != 2: raise ValueError()
  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]             # <<<<<<<<<<<<<<
@@ -10899,13 +10763,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_9);
       __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9);
       __Pyx_GIVEREF(__pyx_t_9);
       __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
       __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __pyx_t_8 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
@@ -10914,18 +10778,18 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __Pyx_GOTREF(__pyx_t_3);
       __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_8, (-__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+      __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_8, (-__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_4);
       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
       __Pyx_GIVEREF(__pyx_t_4);
       __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
@@ -10957,7 +10821,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":564
+    /* "cvcf.pyx":564
  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
  *         except ValueError:             # <<<<<<<<<<<<<<
@@ -10972,7 +10836,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __Pyx_GOTREF(__pyx_t_4);
       __Pyx_GOTREF(__pyx_t_3);
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":565
+      /* "cvcf.pyx":565
  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
  *         except ValueError:
  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)             # <<<<<<<<<<<<<<
@@ -10986,7 +10850,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__BAD_GENOTYPE); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
       __Pyx_GOTREF(__pyx_t_12);
       __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
-      __Pyx_GOTREF(__pyx_t_13);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
       PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
       __Pyx_GIVEREF(__pyx_t_11);
       PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12);
@@ -10996,13 +10860,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __Pyx_GIVEREF(__pyx_v_GTstring);
       __pyx_t_11 = 0;
       __pyx_t_12 = 0;
-      __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+      __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
       __Pyx_GOTREF(__pyx_t_12);
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":566
+      /* "cvcf.pyx":566
  *         except ValueError:
  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)
  *             return [".","|","."]             # <<<<<<<<<<<<<<
@@ -11012,15 +10876,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
       __Pyx_XDECREF(__pyx_r);
       __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_12));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-      PyList_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_kp_s_6));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_57));
-      PyList_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_kp_s_57));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_57));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-      PyList_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_kp_s_6));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+      PyList_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_kp_s_9));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_92));
+      PyList_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_kp_s_92));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_92));
+      __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+      PyList_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_kp_s_9));
+      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
       __pyx_r = ((PyObject *)__pyx_t_12);
       __pyx_t_12 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -11071,7 +10935,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":569
+/* "cvcf.pyx":569
  * 
  * 
  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
@@ -11079,9 +10943,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGT(PyObject *__pyx_self, PyObject *_
  * 
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_convertGTback = {__Pyx_NAMESTR("convertGTback"), (PyCFunction)__pyx_pf_4cvcf_3VCF_convertGTback, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_13convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_13convertGTback = {__Pyx_NAMESTR("convertGTback"), (PyCFunction)__pyx_pf_4cvcf_3VCF_13convertGTback, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_13convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_GTdata = 0;
   PyObject *__pyx_r = NULL;
@@ -11132,7 +10996,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGTback(PyObject *__pyx_self, PyObjec
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":570
+  /* "cvcf.pyx":570
  * 
  *     def convertGTback(self, GTdata):
  *         return ''.join(map(str,GTdata))             # <<<<<<<<<<<<<<
@@ -11143,25 +11007,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGTback(PyObject *__pyx_self, PyObjec
   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)&PyString_Type)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
   __Pyx_INCREF(__pyx_v_GTdata);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_GTdata);
   __Pyx_GIVEREF(__pyx_v_GTdata);
-  __pyx_t_3 = PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_3;
   __pyx_t_3 = 0;
   goto __pyx_L0;
@@ -11180,7 +11044,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGTback(PyObject *__pyx_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":572
+/* "cvcf.pyx":572
  *         return ''.join(map(str,GTdata))
  * 
  *     def parse_formatdata( self, key, value, formatdict, line ):             # <<<<<<<<<<<<<<
@@ -11188,9 +11052,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_convertGTback(PyObject *__pyx_self, PyObjec
  *         f = formatdict.get(key,None)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_parse_formatdata = {__Pyx_NAMESTR("parse_formatdata"), (PyCFunction)__pyx_pf_4cvcf_3VCF_parse_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_14parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_14parse_formatdata = {__Pyx_NAMESTR("parse_formatdata"), (PyCFunction)__pyx_pf_4cvcf_3VCF_14parse_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_14parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_key = 0;
   PyObject *__pyx_v_value = 0;
@@ -11290,7 +11154,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":574
+  /* "cvcf.pyx":574
  *     def parse_formatdata( self, key, value, formatdict, line ):
  *         # To do: check that the right number of values is present
  *         f = formatdict.get(key,None)             # <<<<<<<<<<<<<<
@@ -11300,22 +11164,22 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_formatdict, __pyx_n_s__get); 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_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_key);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
   __Pyx_GIVEREF(__pyx_v_key);
   __Pyx_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
   __Pyx_GIVEREF(Py_None);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_f);
   __pyx_v_f = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":575
+  /* "cvcf.pyx":575
  *         # To do: check that the right number of values is present
  *         f = formatdict.get(key,None)
  *         if f == None:             # <<<<<<<<<<<<<<
@@ -11328,7 +11192,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":576
+    /* "cvcf.pyx":576
  *         f = formatdict.get(key,None)
  *         if f == None:
  *             self._add_definition(formatdict, key, value, line )             # <<<<<<<<<<<<<<
@@ -11338,7 +11202,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___add_definition); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_formatdict);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_formatdict);
     __Pyx_GIVEREF(__pyx_v_formatdict);
@@ -11351,13 +11215,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":577
+    /* "cvcf.pyx":577
  *         if f == None:
  *             self._add_definition(formatdict, key, value, line )
  *             f = formatdict[key]             # <<<<<<<<<<<<<<
@@ -11373,7 +11237,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":578
+  /* "cvcf.pyx":578
  *             self._add_definition(formatdict, key, value, line )
  *             f = formatdict[key]
  *         if f.type == "Flag":             # <<<<<<<<<<<<<<
@@ -11389,7 +11253,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":579
+    /* "cvcf.pyx":579
  *             f = formatdict[key]
  *         if f.type == "Flag":
  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)             # <<<<<<<<<<<<<<
@@ -11400,26 +11264,26 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     if (__pyx_t_4) {
       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_58); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_93); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
       __Pyx_GIVEREF(__pyx_t_1);
       __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L8;
     }
     __pyx_L8:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":580
+    /* "cvcf.pyx":580
  *         if f.type == "Flag":
  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
  *             return []             # <<<<<<<<<<<<<<
@@ -11436,7 +11300,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   }
   __pyx_L7:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":581
+  /* "cvcf.pyx":581
  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
  *             return []
  *         values = value.split(',')             # <<<<<<<<<<<<<<
@@ -11445,68 +11309,56 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_2));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_v_values);
-  __pyx_v_values = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __pyx_v_values = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":583
+  /* "cvcf.pyx":583
  *         values = value.split(',')
  *         # deal with trailing data in some early VCF files
  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:             # <<<<<<<<<<<<<<
  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
  *             values[-1] = values[-1].split(';')[0]
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_5 = __pyx_t_4;
   if (!__pyx_t_5) {
-    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_6 = __pyx_t_4;
     __pyx_t_4 = __pyx_t_6;
   } else {
     __pyx_t_4 = __pyx_t_5;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_t_5 = __pyx_t_4;
   if (__pyx_t_5) {
     __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_4 = (__pyx_t_7 > 0);
     if (__pyx_t_4) {
-      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__find); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_7));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
-      __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_neg_1, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_t_8 = __pyx_t_6;
     } else {
       __pyx_t_8 = __pyx_t_4;
@@ -11517,83 +11369,77 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   }
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":584
+    /* "cvcf.pyx":584
  *         # deal with trailing data in some early VCF files
  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])             # <<<<<<<<<<<<<<
  *             values[-1] = values[-1].split(';')[0]
  *         if f.type == "Integer":
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_TRAILING_DATA); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_TRAILING_DATA); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
     __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_t_1 = 0;
+    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":585
+    /* "cvcf.pyx":585
  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
  *             values[-1] = values[-1].split(';')[0]             # <<<<<<<<<<<<<<
  *         if f.type == "Integer":
  *             for idx,v in enumerate(values):
  */
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_7));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
-    __pyx_t_2 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __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_3); __pyx_t_3 = 0;
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__Pyx_SetItemInt(__pyx_v_values, -1, __pyx_t_3, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__Pyx_SetItemInt(__pyx_v_values, -1, __pyx_t_9, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     goto __pyx_L9;
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":586
+  /* "cvcf.pyx":586
  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
  *             values[-1] = values[-1].split(';')[0]
  *         if f.type == "Integer":             # <<<<<<<<<<<<<<
  *             for idx,v in enumerate(values):
  *                 try:
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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_9); __pyx_t_9 = 0;
   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":587
+    /* "cvcf.pyx":587
  *             values[-1] = values[-1].split(';')[0]
  *         if f.type == "Integer":
  *             for idx,v in enumerate(values):             # <<<<<<<<<<<<<<
@@ -11603,39 +11449,39 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     __Pyx_INCREF(__pyx_int_0);
     __pyx_t_2 = __pyx_int_0;
     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
-      __pyx_t_7 = 0; __pyx_t_3 = __pyx_v_values; __Pyx_INCREF(__pyx_t_3);
+      __pyx_t_7 = 0; __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9);
     } else {
-      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++;
+      if (likely(PyList_CheckExact(__pyx_t_9))) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_9))) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
       } else {
-        __pyx_t_9 = PyIter_Next(__pyx_t_3);
-        if (!__pyx_t_9) {
+        __pyx_t_1 = PyIter_Next(__pyx_t_9);
+        if (!__pyx_t_1) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_1);
       }
       __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __pyx_v_v = __pyx_t_1;
+      __pyx_t_1 = 0;
       __Pyx_INCREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_v_idx);
       __pyx_v_idx = __pyx_t_2;
-      __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_2);
-      __pyx_t_2 = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __pyx_t_2 = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":588
+      /* "cvcf.pyx":588
  *         if f.type == "Integer":
  *             for idx,v in enumerate(values):
  *                 try:             # <<<<<<<<<<<<<<
@@ -11650,43 +11496,43 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
         __Pyx_XGOTREF(__pyx_save_exc_tb);
         /*try:*/ {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":589
+          /* "cvcf.pyx":589
  *             for idx,v in enumerate(values):
  *                 try:
  *                     if v == ".": values[idx] = f.missingvalue             # <<<<<<<<<<<<<<
  *                     else:        values[idx] = int(v)
  *                 except:
  */
-          __pyx_t_9 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
           if (__pyx_t_4) {
-            __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-            __Pyx_GOTREF(__pyx_t_9);
-            if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+            __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+            if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
             goto __pyx_L21;
           }
           /*else*/ {
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":590
+            /* "cvcf.pyx":590
  *                 try:
  *                     if v == ".": values[idx] = f.missingvalue
  *                     else:        values[idx] = int(v)             # <<<<<<<<<<<<<<
  *                 except:
  *                     self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)
  */
-            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-            __Pyx_GOTREF(__pyx_t_9);
+            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+            __Pyx_GOTREF(((PyObject *)__pyx_t_1));
             __Pyx_INCREF(__pyx_v_v);
-            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_v);
+            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v);
             __Pyx_GIVEREF(__pyx_v_v);
-            __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-            if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+            if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
           }
           __pyx_L21:;
         }
@@ -11695,10 +11541,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
         __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
         goto __pyx_L20_try_end;
         __pyx_L13_error:;
-        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
         __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":591
+        /* "cvcf.pyx":591
  *                     if v == ".": values[idx] = f.missingvalue
  *                     else:        values[idx] = int(v)
  *                 except:             # <<<<<<<<<<<<<<
@@ -11707,12 +11553,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
         /*except:*/ {
           __Pyx_AddTraceback("cvcf.VCF.parse_formatdata");
-          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          __Pyx_GOTREF(__pyx_t_3);
           __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_GOTREF(__pyx_t_9);
           __Pyx_GOTREF(__pyx_t_10);
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":592
+          /* "cvcf.pyx":592
  *                     else:        values[idx] = int(v)
  *                 except:
  *                     self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)             # <<<<<<<<<<<<<<
@@ -11721,10 +11567,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
           __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
           __Pyx_GOTREF(__pyx_t_11);
-          __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_59); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_97); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
           __Pyx_GOTREF(__pyx_t_12);
           __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
-          __Pyx_GOTREF(__pyx_t_13);
+          __Pyx_GOTREF(((PyObject *)__pyx_t_13));
           __Pyx_INCREF(__pyx_v_line);
           PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_line);
           __Pyx_GIVEREF(__pyx_v_line);
@@ -11734,13 +11580,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
           PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_values);
           __Pyx_GIVEREF(__pyx_v_values);
           __pyx_t_12 = 0;
-          __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          __pyx_t_12 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
           __Pyx_GOTREF(__pyx_t_12);
           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+          __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":593
+          /* "cvcf.pyx":593
  *                 except:
  *                     self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)
  *                     return [0] * len(values)             # <<<<<<<<<<<<<<
@@ -11768,8 +11614,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
           goto __pyx_L16_except_return;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
           goto __pyx_L14_exception_handled;
         }
@@ -11793,10 +11639,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
         __pyx_L20_try_end:;
       }
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":594
+    /* "cvcf.pyx":594
  *                     self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)
  *                     return [0] * len(values)
  *             return values             # <<<<<<<<<<<<<<
@@ -11810,7 +11656,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     goto __pyx_L10;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":595
+  /* "cvcf.pyx":595
  *                     return [0] * len(values)
  *             return values
  *         elif f.type == "String":             # <<<<<<<<<<<<<<
@@ -11819,14 +11665,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__String), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__String), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":596
+    /* "cvcf.pyx":596
  *             return values
  *         elif f.type == "String":
  *             self._line = line             # <<<<<<<<<<<<<<
@@ -11835,34 +11681,34 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___line, __pyx_v_line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":597
+    /* "cvcf.pyx":597
  *         elif f.type == "String":
  *             self._line = line
  *             if f.id == "GT": values = map( self.convertGT, values )             # <<<<<<<<<<<<<<
  *             return values
  *         elif f.type == "Character":
  */
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__GT), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__GT), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __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_9); __pyx_t_9 = 0;
     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     if (__pyx_t_4) {
       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__convertGT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __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 = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
       __Pyx_GIVEREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_values);
-      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_values);
+      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_values);
       __Pyx_GIVEREF(__pyx_v_values);
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
       __Pyx_DECREF(__pyx_v_values);
       __pyx_v_values = __pyx_t_2;
       __pyx_t_2 = 0;
@@ -11870,7 +11716,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     }
     __pyx_L24:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":598
+    /* "cvcf.pyx":598
  *             self._line = line
  *             if f.id == "GT": values = map( self.convertGT, values )
  *             return values             # <<<<<<<<<<<<<<
@@ -11884,7 +11730,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     goto __pyx_L10;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":599
+  /* "cvcf.pyx":599
  *             if f.id == "GT": values = map( self.convertGT, values )
  *             return values
  *         elif f.type == "Character":             # <<<<<<<<<<<<<<
@@ -11893,14 +11739,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
   __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__Character), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__Character), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":600
+    /* "cvcf.pyx":600
  *             return values
  *         elif f.type == "Character":
  *             for v in values:             # <<<<<<<<<<<<<<
@@ -11908,20 +11754,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  *             return values
  */
     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
-      __pyx_t_7 = 0; __pyx_t_3 = __pyx_v_values; __Pyx_INCREF(__pyx_t_3);
+      __pyx_t_7 = 0; __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9);
     } else {
-      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
+      if (likely(PyList_CheckExact(__pyx_t_9))) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_9))) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
       } else {
-        __pyx_t_2 = PyIter_Next(__pyx_t_3);
+        __pyx_t_2 = PyIter_Next(__pyx_t_9);
         if (!__pyx_t_2) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
@@ -11932,7 +11778,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
       __pyx_v_v = __pyx_t_2;
       __pyx_t_2 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":601
+      /* "cvcf.pyx":601
  *         elif f.type == "Character":
  *             for v in values:
  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)             # <<<<<<<<<<<<<<
@@ -11944,28 +11790,28 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
       if (__pyx_t_4) {
         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_60); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_98); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10);
         __Pyx_GIVEREF(__pyx_t_10);
         __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         goto __pyx_L27;
       }
       __pyx_L27:;
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":602
+    /* "cvcf.pyx":602
  *             for v in values:
  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
  *             return values             # <<<<<<<<<<<<<<
@@ -11979,23 +11825,23 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     goto __pyx_L10;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":603
+  /* "cvcf.pyx":603
  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
  *             return values
  *         elif f.type == "Float":             # <<<<<<<<<<<<<<
  *             for idx,v in enumerate(values):
  *                 if v == ".": values[idx] = f.missingvalue
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":604
+    /* "cvcf.pyx":604
  *             return values
  *         elif f.type == "Float":
  *             for idx,v in enumerate(values):             # <<<<<<<<<<<<<<
@@ -12005,62 +11851,62 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
     __Pyx_INCREF(__pyx_int_0);
     __pyx_t_10 = __pyx_int_0;
     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
-      __pyx_t_7 = 0; __pyx_t_3 = __pyx_v_values; __Pyx_INCREF(__pyx_t_3);
+      __pyx_t_7 = 0; __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9);
     } else {
-      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++;
+      if (likely(PyList_CheckExact(__pyx_t_9))) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_9))) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
       } else {
-        __pyx_t_9 = PyIter_Next(__pyx_t_3);
-        if (!__pyx_t_9) {
+        __pyx_t_1 = PyIter_Next(__pyx_t_9);
+        if (!__pyx_t_1) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_1);
       }
       __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __pyx_v_v = __pyx_t_1;
+      __pyx_t_1 = 0;
       __Pyx_INCREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_v_idx);
       __pyx_v_idx = __pyx_t_10;
-      __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = PyNumber_Add(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_10);
-      __pyx_t_10 = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __pyx_t_10 = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":605
+      /* "cvcf.pyx":605
  *         elif f.type == "Float":
  *             for idx,v in enumerate(values):
  *                 if v == ".": values[idx] = f.missingvalue             # <<<<<<<<<<<<<<
  *             try: return map(float,values)
  *             except:
  */
-      __pyx_t_9 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       if (__pyx_t_4) {
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         goto __pyx_L30;
       }
       __pyx_L30:;
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":606
+    /* "cvcf.pyx":606
  *             for idx,v in enumerate(values):
  *                 if v == ".": values[idx] = f.missingvalue
  *             try: return map(float,values)             # <<<<<<<<<<<<<<
@@ -12076,18 +11922,18 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
       /*try:*/ {
         __Pyx_XDECREF(__pyx_r);
         __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
-        PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)((PyObject*)&PyFloat_Type)));
-        __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
+        __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
+        PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
+        __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
         __Pyx_INCREF(__pyx_v_values);
         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_values);
         __Pyx_GIVEREF(__pyx_v_values);
-        __pyx_t_3 = PyObject_Call(__pyx_builtin_map, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_r = __pyx_t_3;
-        __pyx_t_3 = 0;
+        __pyx_t_9 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+        __pyx_r = __pyx_t_9;
+        __pyx_t_9 = 0;
         goto __pyx_L35_try_return;
       }
       __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
@@ -12104,13 +11950,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
       __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":607
+      /* "cvcf.pyx":607
  *                 if v == ".": values[idx] = f.missingvalue
  *             try: return map(float,values)
  *             except:             # <<<<<<<<<<<<<<
@@ -12119,12 +11965,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
       /*except:*/ {
         __Pyx_AddTraceback("cvcf.VCF.parse_formatdata");
-        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_GOTREF(__pyx_t_10);
+        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
         __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_1);
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":608
+        /* "cvcf.pyx":608
  *             try: return map(float,values)
  *             except:
  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)             # <<<<<<<<<<<<<<
@@ -12133,26 +11979,26 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  */
         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_59); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_97); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_3);
         __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_11));
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
-        __Pyx_GIVEREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
         __Pyx_INCREF(__pyx_v_values);
         PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_values);
         __Pyx_GIVEREF(__pyx_v_values);
-        __pyx_t_1 = 0;
-        __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_3 = 0;
+        __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_3);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":609
+        /* "cvcf.pyx":609
  *             except:
  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,values)
  *                 return [0.0] * len(values)             # <<<<<<<<<<<<<<
@@ -12160,29 +12006,29 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  *             # can't happen
  */
         __Pyx_XDECREF(__pyx_r);
-        __pyx_t_1 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_3 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_3);
         __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_11));
-        PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
-        __Pyx_GIVEREF(__pyx_t_1);
-        __pyx_t_1 = 0;
+        PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __pyx_t_3 = 0;
         __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_2 = PyNumber_Multiply(((PyObject *)__pyx_t_11), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_2 = PyNumber_Multiply(((PyObject *)__pyx_t_11), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __pyx_r = __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;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         goto __pyx_L34_except_return;
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         goto __pyx_L32_exception_handled;
       }
       __pyx_L33_except_error:;
@@ -12208,29 +12054,29 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":612
+    /* "cvcf.pyx":612
  *         else:
  *             # can't happen
  *             self.error(line,self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
  * 
  * 
  */
-    __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10);
+    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
     __Pyx_GIVEREF(__pyx_t_10);
     __pyx_t_10 = 0;
-    __pyx_t_10 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   }
   __pyx_L10:;
@@ -12258,7 +12104,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":615
+/* "cvcf.pyx":615
  * 
  * 
  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
@@ -12266,9 +12112,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_formatdata(PyObject *__pyx_self, PyOb
  *         for r in self._regions:
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_inregion = {__Pyx_NAMESTR("inregion"), (PyCFunction)__pyx_pf_4cvcf_3VCF_inregion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_15inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_15inregion = {__Pyx_NAMESTR("inregion"), (PyCFunction)__pyx_pf_4cvcf_3VCF_15inregion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_15inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_chrom = 0;
   PyObject *__pyx_v_pos = 0;
@@ -12336,7 +12182,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_r = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":616
+  /* "cvcf.pyx":616
  * 
  *     def inregion(self, chrom, pos):
  *         if not self._regions: return True             # <<<<<<<<<<<<<<
@@ -12359,7 +12205,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":617
+  /* "cvcf.pyx":617
  *     def inregion(self, chrom, pos):
  *         if not self._regions: return True
  *         for r in self._regions:             # <<<<<<<<<<<<<<
@@ -12394,7 +12240,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__
     __pyx_v_r = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":618
+    /* "cvcf.pyx":618
  *         if not self._regions: return True
  *         for r in self._regions:
  *             if r[0] == chrom and r[1] <= pos < r[2]: return True             # <<<<<<<<<<<<<<
@@ -12442,7 +12288,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":619
+  /* "cvcf.pyx":619
  *         for r in self._regions:
  *             if r[0] == chrom and r[1] <= pos < r[2]: return True
  *         return False             # <<<<<<<<<<<<<<
@@ -12472,7 +12318,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":622
+/* "cvcf.pyx":622
  * 
  * 
  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
@@ -12480,9 +12326,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_inregion(PyObject *__pyx_self, PyObject *__
  *         if len(cols) != len(self._samples)+9:
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_parse_data = {__Pyx_NAMESTR("parse_data"), (PyCFunction)__pyx_pf_4cvcf_3VCF_parse_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_16parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_16parse_data = {__Pyx_NAMESTR("parse_data"), (PyCFunction)__pyx_pf_4cvcf_3VCF_16parse_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_16parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_lineparse = 0;
@@ -12526,16 +12372,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   PyObject *__pyx_v_value;
   PyObject *__pyx_v_d;
   PyObject *__pyx_v_key;
-  PyObject *__pyx_8genexpr0__pyx_v_allele;
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_3;
   Py_ssize_t __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
+  int __pyx_t_5;
   int __pyx_t_6;
   int __pyx_t_7;
-  int __pyx_t_8;
+  PyObject *__pyx_t_8 = NULL;
   PyObject *__pyx_t_9 = NULL;
   PyObject *__pyx_t_10 = NULL;
   PyObject *__pyx_t_11 = NULL;
@@ -12555,7 +12400,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   if (unlikely(__pyx_kwds)) {
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[3] = {0,0,0};
-    values[2] = __pyx_k_61;
+    values[2] = __pyx_k_99;
     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);
@@ -12587,7 +12432,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_v_line = values[1];
     __pyx_v_lineparse = values[2];
   } else {
-    __pyx_v_lineparse = __pyx_k_61;
+    __pyx_v_lineparse = __pyx_k_99;
     switch (PyTuple_GET_SIZE(__pyx_args)) {
       case  3:
       __pyx_v_lineparse = PyTuple_GET_ITEM(__pyx_args, 2);
@@ -12617,13 +12462,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_v_faref = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_alt = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_filter = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_info = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_info = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_blurp = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_elts = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_format = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_newalts = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_newalts = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_a = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_l = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_addns = Py_None; __Pyx_INCREF(Py_None);
@@ -12634,17 +12479,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_v_allele = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_longest = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_shortest = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_samples = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_samples = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_sample = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_dict = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_dict = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_values = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_expected = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_d = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_d = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_8genexpr0__pyx_v_allele = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":623
+  /* "cvcf.pyx":623
  * 
  *     def parse_data( self, line, lineparse=False ):
  *         cols = line.split('\t')             # <<<<<<<<<<<<<<
@@ -12653,145 +12497,139 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_51));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_51));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_51));
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_cols);
-  __pyx_v_cols = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_v_cols = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":624
+  /* "cvcf.pyx":624
  *     def parse_data( self, line, lineparse=False ):
  *         cols = line.split('\t')
  *         if len(cols) != len(self._samples)+9:             # <<<<<<<<<<<<<<
  *             # gracefully deal with absent FORMAT column
  *             if len(cols) == 8 and len(self._samples)==0:
  */
-  __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_6 = (__pyx_t_4 != (__pyx_t_5 + 9));
-  if (__pyx_t_6) {
+  __pyx_t_3 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = (__pyx_t_3 != (__pyx_t_4 + 9));
+  if (__pyx_t_5) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":626
+    /* "cvcf.pyx":626
  *         if len(cols) != len(self._samples)+9:
  *             # gracefully deal with absent FORMAT column
  *             if len(cols) == 8 and len(self._samples)==0:             # <<<<<<<<<<<<<<
  *                 cols.append("")
  *             else:
  */
-    __pyx_t_5 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = (__pyx_t_5 == 8);
-    if (__pyx_t_6) {
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = (__pyx_t_5 == 0);
-      __pyx_t_8 = __pyx_t_7;
+    __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = (__pyx_t_4 == 8);
+    if (__pyx_t_5) {
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_6 = (__pyx_t_4 == 0);
+      __pyx_t_7 = __pyx_t_6;
     } else {
-      __pyx_t_8 = __pyx_t_6;
+      __pyx_t_7 = __pyx_t_5;
     }
-    if (__pyx_t_8) {
+    if (__pyx_t_7) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":627
+      /* "cvcf.pyx":627
  *             # gracefully deal with absent FORMAT column
  *             if len(cols) == 8 and len(self._samples)==0:
  *                 cols.append("")             # <<<<<<<<<<<<<<
  *             else:
  *                 self.error(line,
  */
-      __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_cols, ((PyObject *)__pyx_kp_s_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_cols, ((PyObject *)__pyx_kp_s_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       goto __pyx_L7;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":629
+      /* "cvcf.pyx":629
  *                 cols.append("")
  *             else:
  *                 self.error(line,             # <<<<<<<<<<<<<<
  *                            self.BAD_NUMBER_OF_COLUMNS,
  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":630
+      /* "cvcf.pyx":630
  *             else:
  *                 self.error(line,
  *                            self.BAD_NUMBER_OF_COLUMNS,             # <<<<<<<<<<<<<<
  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
  * 
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_62); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_101); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":631
+      /* "cvcf.pyx":631
  *                 self.error(line,
  *                            self.BAD_NUMBER_OF_COLUMNS,
  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))             # <<<<<<<<<<<<<<
  * 
  *         chrom = cols[0]
  */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_5 + 9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_4 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_8 = PyInt_FromSsize_t((__pyx_t_4 + 9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_5 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
       __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_5 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
       __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
       PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9);
       __Pyx_GIVEREF(__pyx_t_9);
       PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_10);
       __Pyx_GIVEREF(__pyx_t_10);
       PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_11);
       __Pyx_GIVEREF(__pyx_t_11);
-      __pyx_t_1 = 0;
+      __pyx_t_8 = 0;
       __pyx_t_9 = 0;
       __pyx_t_10 = 0;
       __pyx_t_11 = 0;
-      __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_63), __pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_102), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_11));
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
       __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
       PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_t_11));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
-      __pyx_t_2 = 0;
+      __pyx_t_1 = 0;
       __pyx_t_11 = 0;
-      __pyx_t_11 = PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     }
     __pyx_L7:;
@@ -12799,7 +12637,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":633
+  /* "cvcf.pyx":633
  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
  * 
  *         chrom = cols[0]             # <<<<<<<<<<<<<<
@@ -12812,7 +12650,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_v_chrom = __pyx_t_11;
   __pyx_t_11 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":636
+  /* "cvcf.pyx":636
  * 
  *         # get 0-based position
  *         try:    pos = int(cols[1])-1             # <<<<<<<<<<<<<<
@@ -12829,13 +12667,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
       __Pyx_GOTREF(__pyx_t_11);
       __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
       PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
       __Pyx_GIVEREF(__pyx_t_11);
       __pyx_t_11 = 0;
-      __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+      __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
       __pyx_t_12 = PyNumber_Subtract(__pyx_t_11, __pyx_int_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
       __Pyx_GOTREF(__pyx_t_12);
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -12848,15 +12686,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
     goto __pyx_L15_try_end;
     __pyx_L8_error:;
-    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":637
+    /* "cvcf.pyx":637
  *         # get 0-based position
  *         try:    pos = int(cols[1])-1
  *         except: self.error(line,self.POS_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
@@ -12865,30 +12703,30 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     /*except:*/ {
       __Pyx_AddTraceback("cvcf.VCF.parse_data");
-      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
       __Pyx_GOTREF(__pyx_t_12);
       __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
       __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS_NOT_NUMERICAL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
       __Pyx_GOTREF(__pyx_t_10);
       __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
       __Pyx_GIVEREF(__pyx_t_10);
       __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+      __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       goto __pyx_L9_exception_handled;
     }
     __pyx_L10_except_error:;
@@ -12905,40 +12743,40 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_L15_try_end:;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":638
+  /* "cvcf.pyx":638
  *         try:    pos = int(cols[1])-1
  *         except: self.error(line,self.POS_NOT_NUMERICAL)
  *         if pos < 0: self.error(line,self.POS_NOT_POSITIVE)             # <<<<<<<<<<<<<<
  * 
  *         # implement filtering
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_8) {
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_7) {
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS_NOT_POSITIVE); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_12);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
     __Pyx_GIVEREF(__pyx_t_11);
     __pyx_t_11 = 0;
-    __pyx_t_11 = PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     goto __pyx_L18;
   }
   __pyx_L18:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":641
+  /* "cvcf.pyx":641
  * 
  *         # implement filtering
  *         if not self.inregion(chrom,pos): return None             # <<<<<<<<<<<<<<
@@ -12948,21 +12786,21 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__inregion); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
   __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_12);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
   __Pyx_INCREF(__pyx_v_chrom);
   PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_chrom);
   __Pyx_GIVEREF(__pyx_v_chrom);
   __Pyx_INCREF(__pyx_v_pos);
   PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_pos);
   __Pyx_GIVEREF(__pyx_v_pos);
-  __pyx_t_3 = PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_6 = (!__pyx_t_8);
-  if (__pyx_t_6) {
+  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = (!__pyx_t_7);
+  if (__pyx_t_5) {
     __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = Py_None;
@@ -12971,105 +12809,105 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   __pyx_L19:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":644
+  /* "cvcf.pyx":644
  * 
  *         # end of first-pass parse for sortedVCF
  *         if lineparse: return chrom, pos, line             # <<<<<<<<<<<<<<
  * 
  *         id = cols[2]
  */
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_lineparse); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_6) {
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_lineparse); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_chrom);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chrom);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
     __Pyx_GIVEREF(__pyx_v_chrom);
     __Pyx_INCREF(__pyx_v_pos);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_pos);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
     __Pyx_GIVEREF(__pyx_v_pos);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = 0;
     goto __pyx_L0;
     goto __pyx_L20;
   }
   __pyx_L20:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":646
+  /* "cvcf.pyx":646
  *         if lineparse: return chrom, pos, line
  * 
  *         id = cols[2]             # <<<<<<<<<<<<<<
  * 
  *         ref = cols[3].upper()
  */
-  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_cols, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_v_id);
-  __pyx_v_id = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_v_id = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":648
+  /* "cvcf.pyx":648
  *         id = cols[2]
  * 
  *         ref = cols[3].upper()             # <<<<<<<<<<<<<<
  *         if ref == ".":
  *             self.error(line,self.MISSING_REF)
  */
-  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_cols, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_12 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__upper); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   __Pyx_DECREF(__pyx_v_ref);
-  __pyx_v_ref = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_v_ref = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":649
+  /* "cvcf.pyx":649
  * 
  *         ref = cols[3].upper()
  *         if ref == ".":             # <<<<<<<<<<<<<<
  *             self.error(line,self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_ref, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_6) {
+  __pyx_t_2 = PyObject_RichCompare(__pyx_v_ref, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_5) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":650
+    /* "cvcf.pyx":650
  *         ref = cols[3].upper()
  *         if ref == ".":
  *             self.error(line,self.MISSING_REF)             # <<<<<<<<<<<<<<
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
  *             else:                   ref = ""
  */
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__MISSING_REF); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_12);
     __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12);
     __Pyx_GIVEREF(__pyx_t_12);
     __pyx_t_12 = 0;
-    __pyx_t_12 = PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_12 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_12);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":651
+    /* "cvcf.pyx":651
  *         if ref == ".":
  *             self.error(line,self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)             # <<<<<<<<<<<<<<
@@ -13081,17 +12919,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
       __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
       __pyx_t_12 = PyNumber_Add(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_chrom);
       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chrom);
       __Pyx_GIVEREF(__pyx_v_chrom);
@@ -13100,22 +12938,22 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __Pyx_GIVEREF(__pyx_v_pos);
       PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_12);
       __Pyx_GIVEREF(__pyx_t_12);
-      PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_3);
-      __Pyx_GIVEREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       __pyx_t_12 = 0;
-      __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_3;
-      __pyx_t_3 = 0;
+      __pyx_v_ref = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L22;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":652
+      /* "cvcf.pyx":652
  *             self.error(line,self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
  *             else:                   ref = ""             # <<<<<<<<<<<<<<
@@ -13131,7 +12969,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":654
+    /* "cvcf.pyx":654
  *             else:                   ref = ""
  *         else:
  *             for c in ref:             # <<<<<<<<<<<<<<
@@ -13139,20 +12977,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *             if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)
  */
     if (PyList_CheckExact(__pyx_v_ref) || PyTuple_CheckExact(__pyx_v_ref)) {
-      __pyx_t_5 = 0; __pyx_t_3 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_3);
+      __pyx_t_4 = 0; __pyx_t_2 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_2);
     } else {
-      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_10); __pyx_t_5++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_10); __pyx_t_5++;
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
       } else {
-        __pyx_t_10 = PyIter_Next(__pyx_t_3);
+        __pyx_t_10 = PyIter_Next(__pyx_t_2);
         if (!__pyx_t_10) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
@@ -13163,51 +13001,51 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __pyx_v_c = __pyx_t_10;
       __pyx_t_10 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":655
+      /* "cvcf.pyx":655
  *         else:
  *             for c in ref:
  *                 if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF)             # <<<<<<<<<<<<<<
  *             if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)
  * 
  */
-      __pyx_t_6 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_n_s__ACGTN), __pyx_v_c))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_6) {
+      __pyx_t_5 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_n_s__ACGTN), __pyx_v_c))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_5) {
         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__UNKNOWN_CHAR_IN_REF); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_11);
         __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_12));
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
         __Pyx_GIVEREF(__pyx_t_11);
         __pyx_t_11 = 0;
-        __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_11);
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
         goto __pyx_L25;
       }
       __pyx_L25:;
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":656
+    /* "cvcf.pyx":656
  *             for c in ref:
  *                 if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF)
  *             if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)             # <<<<<<<<<<<<<<
  * 
  *         # make sure reference is sane
  */
-    __pyx_t_6 = ((PySequence_Contains(__pyx_v_ref, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_6) {
-      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((PySequence_Contains(__pyx_v_ref, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
+      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
       __pyx_t_12 = PyNumber_Add(__pyx_v_pos, __pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_12);
@@ -13215,7 +13053,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
       __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_chrom);
       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chrom);
       __Pyx_GIVEREF(__pyx_v_chrom);
@@ -13228,10 +13066,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __Pyx_GIVEREF(__pyx_t_11);
       __pyx_t_12 = 0;
       __pyx_t_11 = 0;
-      __pyx_t_11 = PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_v_ref);
       __pyx_v_ref = __pyx_t_11;
       __pyx_t_11 = 0;
@@ -13241,7 +13079,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   __pyx_L21:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":659
+  /* "cvcf.pyx":659
  * 
  *         # make sure reference is sane
  *         if self._reference:             # <<<<<<<<<<<<<<
@@ -13250,11 +13088,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
   __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  if (__pyx_t_6) {
+  if (__pyx_t_5) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":660
+    /* "cvcf.pyx":660
  *         # make sure reference is sane
  *         if self._reference:
  *             left = max(0,pos-100)             # <<<<<<<<<<<<<<
@@ -13264,14 +13102,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_t_11 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_100); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __pyx_t_13 = 0;
-    __pyx_t_3 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_3, Py_GT); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_2, Py_GT); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_12);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
       __Pyx_INCREF(__pyx_t_11);
       __pyx_t_10 = __pyx_t_11;
     } else {
@@ -13286,7 +13124,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_v_left = __pyx_t_10;
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":661
+    /* "cvcf.pyx":661
  *         if self._reference:
  *             left = max(0,pos-100)
  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)             # <<<<<<<<<<<<<<
@@ -13295,37 +13133,37 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __pyx_t_12 = PyNumber_Add(__pyx_v_pos, __pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_12);
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     __Pyx_INCREF(__pyx_v_chrom);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chrom);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
     __Pyx_GIVEREF(__pyx_v_chrom);
     __Pyx_INCREF(__pyx_v_left);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_left);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_left);
     __Pyx_GIVEREF(__pyx_v_left);
-    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_12);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_12);
     __Pyx_GIVEREF(__pyx_t_12);
-    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_11);
+    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_11);
     __Pyx_GIVEREF(__pyx_t_11);
     __pyx_t_12 = 0;
     __pyx_t_11 = 0;
-    __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_faref_leftflank);
     __pyx_v_faref_leftflank = __pyx_t_11;
     __pyx_t_11 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":662
+    /* "cvcf.pyx":662
  *             left = max(0,pos-100)
  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
  *             faref = faref_leftflank[pos-left:]             # <<<<<<<<<<<<<<
@@ -13334,15 +13172,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     __pyx_t_11 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    __pyx_t_11 = PySequence_GetSlice(__pyx_v_faref_leftflank, __pyx_t_5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_PySequence_GetSlice(__pyx_v_faref_leftflank, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_v_faref);
     __pyx_v_faref = __pyx_t_11;
     __pyx_t_11 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":663
+    /* "cvcf.pyx":663
  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
  *             faref = faref_leftflank[pos-left:]
  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))             # <<<<<<<<<<<<<<
@@ -13351,45 +13189,45 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     __pyx_t_11 = PyObject_RichCompare(__pyx_v_faref, __pyx_v_ref, Py_NE); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
       __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__WRONG_REF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__WRONG_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_faref);
       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_faref);
       __Pyx_GIVEREF(__pyx_v_faref);
       __Pyx_INCREF(__pyx_v_ref);
       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_ref);
       __Pyx_GIVEREF(__pyx_v_ref);
-      __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), __pyx_t_10); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_103), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_12));
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
       __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3);
-      __Pyx_GIVEREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_t_12));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
-      __pyx_t_3 = 0;
+      __pyx_t_2 = 0;
       __pyx_t_12 = 0;
-      __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_12 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_12);
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       goto __pyx_L28;
     }
     __pyx_L28:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":664
+    /* "cvcf.pyx":664
  *             faref = faref_leftflank[pos-left:]
  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
  *             ref = faref             # <<<<<<<<<<<<<<
@@ -13403,7 +13241,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   __pyx_L27:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":667
+  /* "cvcf.pyx":667
  * 
  *         # convert v3.3 to v4.0 alleles below
  *         if cols[4] == ".": alt = []             # <<<<<<<<<<<<<<
@@ -13412,12 +13250,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
   __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
-  __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
   __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (__pyx_t_6) {
+  if (__pyx_t_5) {
     __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_10));
     __Pyx_DECREF(__pyx_v_alt);
@@ -13427,7 +13265,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":668
+    /* "cvcf.pyx":668
  *         # convert v3.3 to v4.0 alleles below
  *         if cols[4] == ".": alt = []
  *         else: alt = cols[4].upper().split(',')             # <<<<<<<<<<<<<<
@@ -13445,42 +13283,36 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_t_12 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__split); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_12);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
-    PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_kp_s_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
-    __pyx_t_11 = PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     __Pyx_DECREF(__pyx_v_alt);
-    __pyx_v_alt = __pyx_t_11;
-    __pyx_t_11 = 0;
+    __pyx_v_alt = __pyx_t_10;
+    __pyx_t_10 = 0;
   }
   __pyx_L29:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":670
+  /* "cvcf.pyx":670
  *         else: alt = cols[4].upper().split(',')
  * 
  *         if cols[5] == ".": qual = -1             # <<<<<<<<<<<<<<
  *         else:
  *             try:    qual = float(cols[5])
  */
-  __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_10 = PyObject_RichCompare(__pyx_t_11, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (__pyx_t_6) {
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  if (__pyx_t_5) {
     __pyx_v_qual = -1.0;
     goto __pyx_L30;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":672
+    /* "cvcf.pyx":672
  *         if cols[5] == ".": qual = -1
  *         else:
  *             try:    qual = float(cols[5])             # <<<<<<<<<<<<<<
@@ -13494,10 +13326,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __Pyx_XGOTREF(__pyx_save_exc_value);
       __Pyx_XGOTREF(__pyx_save_exc_tb);
       /*try:*/ {
-        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_14 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_14 = __Pyx_PyObject_AsDouble(__pyx_t_12); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         __pyx_v_qual = __pyx_t_14;
       }
       __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
@@ -13505,15 +13337,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
       goto __pyx_L38_try_end;
       __pyx_L31_error:;
+      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":673
+      /* "cvcf.pyx":673
  *         else:
  *             try:    qual = float(cols[5])
  *             except: self.error(line,self.QUAL_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
@@ -13522,30 +13354,30 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
       /*except:*/ {
         __Pyx_AddTraceback("cvcf.VCF.parse_data");
-        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_10, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_12);
         __Pyx_GOTREF(__pyx_t_10);
         __Pyx_GOTREF(__pyx_t_11);
-        __Pyx_GOTREF(__pyx_t_12);
-        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9);
         __Pyx_GIVEREF(__pyx_t_9);
         __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         goto __pyx_L32_exception_handled;
       }
       __pyx_L33_except_error:;
@@ -13564,74 +13396,68 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   __pyx_L30:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":676
+  /* "cvcf.pyx":676
  * 
  *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
  *         if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []             # <<<<<<<<<<<<<<
  *         else: filter = cols[6].split(';')
  * 
  */
-  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_12);
-  __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, ((PyObject *)__pyx_kp_s_6), Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = PyObject_RichCompare(__pyx_t_11, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  if (!__pyx_t_6) {
-    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  if (!__pyx_t_5) {
+    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__PASS), Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, ((PyObject *)__pyx_n_s__PASS), Py_EQ); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_12);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-    if (!__pyx_t_8) {
-      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, ((PyObject *)__pyx_kp_s__0), Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_7) {
+      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_RichCompare(__pyx_t_11, ((PyObject *)__pyx_kp_s__0), Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __pyx_t_15 = __pyx_t_7;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_15 = __pyx_t_6;
     } else {
-      __pyx_t_15 = __pyx_t_8;
+      __pyx_t_15 = __pyx_t_7;
     }
-    __pyx_t_8 = __pyx_t_15;
+    __pyx_t_7 = __pyx_t_15;
   } else {
-    __pyx_t_8 = __pyx_t_6;
+    __pyx_t_7 = __pyx_t_5;
   }
-  if (__pyx_t_8) {
-    __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
+  if (__pyx_t_7) {
+    __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
     __Pyx_DECREF(__pyx_v_filter);
-    __pyx_v_filter = ((PyObject *)__pyx_t_11);
-    __pyx_t_11 = 0;
+    __pyx_v_filter = ((PyObject *)__pyx_t_10);
+    __pyx_t_10 = 0;
     goto __pyx_L41;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":677
+    /* "cvcf.pyx":677
  *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
  *         if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []
  *         else: filter = cols[6].split(';')             # <<<<<<<<<<<<<<
  * 
  *         # dictionary of keys, and list of values
  */
-    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_12 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__split); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_12);
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_11 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__split); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
-    PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_kp_s_7));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
-    __pyx_t_10 = PyObject_Call(__pyx_t_12, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     __Pyx_DECREF(__pyx_v_filter);
     __pyx_v_filter = __pyx_t_10;
@@ -13639,7 +13465,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   __pyx_L41:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":680
+  /* "cvcf.pyx":680
  * 
  *         # dictionary of keys, and list of values
  *         info = {}             # <<<<<<<<<<<<<<
@@ -13652,7 +13478,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_v_info = __pyx_t_10;
   __pyx_t_10 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":681
+  /* "cvcf.pyx":681
  *         # dictionary of keys, and list of values
  *         info = {}
  *         if cols[7] != ".":             # <<<<<<<<<<<<<<
@@ -13661,14 +13487,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
   __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_kp_s_6), Py_NE); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_kp_s_9), Py_NE); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  if (__pyx_t_8) {
+  if (__pyx_t_7) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":682
+    /* "cvcf.pyx":682
  *         info = {}
  *         if cols[7] != ".":
  *             for blurp in cols[7].split(';'):             # <<<<<<<<<<<<<<
@@ -13680,219 +13506,201 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_t_10 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
-    PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_kp_s_7));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
-    __pyx_t_12 = PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_12);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) {
-      __pyx_t_5 = 0; __pyx_t_11 = __pyx_t_12; __Pyx_INCREF(__pyx_t_11);
+    if (PyList_CheckExact(__pyx_t_11) || PyTuple_CheckExact(__pyx_t_11)) {
+      __pyx_t_4 = 0; __pyx_t_10 = __pyx_t_11; __Pyx_INCREF(__pyx_t_10);
     } else {
-      __pyx_t_5 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
     }
-    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_11))) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_11)) break;
-        __pyx_t_12 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_12); __pyx_t_5++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_11))) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
-        __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_12); __pyx_t_5++;
+      if (likely(PyList_CheckExact(__pyx_t_10))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_10)) break;
+        __pyx_t_11 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_10))) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+        __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++;
       } else {
-        __pyx_t_12 = PyIter_Next(__pyx_t_11);
-        if (!__pyx_t_12) {
+        __pyx_t_11 = PyIter_Next(__pyx_t_10);
+        if (!__pyx_t_11) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_GOTREF(__pyx_t_11);
       }
       __Pyx_DECREF(__pyx_v_blurp);
-      __pyx_v_blurp = __pyx_t_12;
-      __pyx_t_12 = 0;
+      __pyx_v_blurp = __pyx_t_11;
+      __pyx_t_11 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":683
+      /* "cvcf.pyx":683
  *         if cols[7] != ".":
  *             for blurp in cols[7].split(';'):
  *                 elts = blurp.split('=')             # <<<<<<<<<<<<<<
  *                 if len(elts) == 1: v = None
  *                 elif len(elts) == 2: v = elts[1]
  */
-      __pyx_t_12 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_12 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
-      PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_kp_s_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
-      __pyx_t_9 = PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
       __Pyx_DECREF(__pyx_v_elts);
-      __pyx_v_elts = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __pyx_v_elts = __pyx_t_12;
+      __pyx_t_12 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":684
+      /* "cvcf.pyx":684
  *             for blurp in cols[7].split(';'):
  *                 elts = blurp.split('=')
  *                 if len(elts) == 1: v = None             # <<<<<<<<<<<<<<
  *                 elif len(elts) == 2: v = elts[1]
  *                 else: self.error(line,self.ERROR_INFO_STRING)
  */
-      __pyx_t_4 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_8 = (__pyx_t_4 == 1);
-      if (__pyx_t_8) {
+      __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = (__pyx_t_3 == 1);
+      if (__pyx_t_7) {
         __Pyx_INCREF(Py_None);
         __Pyx_DECREF(__pyx_v_v);
         __pyx_v_v = Py_None;
         goto __pyx_L45;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":685
+      /* "cvcf.pyx":685
  *                 elts = blurp.split('=')
  *                 if len(elts) == 1: v = None
  *                 elif len(elts) == 2: v = elts[1]             # <<<<<<<<<<<<<<
  *                 else: self.error(line,self.ERROR_INFO_STRING)
  *                 info[elts[0]] = self.parse_formatdata(elts[0], v, self._info, line)
  */
-      __pyx_t_4 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_8 = (__pyx_t_4 == 2);
-      if (__pyx_t_8) {
-        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = (__pyx_t_3 == 2);
+      if (__pyx_t_7) {
+        __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
         __Pyx_DECREF(__pyx_v_v);
-        __pyx_v_v = __pyx_t_9;
-        __pyx_t_9 = 0;
+        __pyx_v_v = __pyx_t_12;
+        __pyx_t_12 = 0;
         goto __pyx_L45;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":686
+        /* "cvcf.pyx":686
  *                 if len(elts) == 1: v = None
  *                 elif len(elts) == 2: v = elts[1]
  *                 else: self.error(line,self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
  *                 info[elts[0]] = self.parse_formatdata(elts[0], v, self._info, line)
  * 
  */
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
-        __Pyx_GIVEREF(__pyx_t_10);
-        __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11);
+        __Pyx_GIVEREF(__pyx_t_11);
+        __pyx_t_11 = 0;
+        __pyx_t_11 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
         __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
       }
       __pyx_L45:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":687
+      /* "cvcf.pyx":687
  *                 elif len(elts) == 2: v = elts[1]
  *                 else: self.error(line,self.ERROR_INFO_STRING)
  *                 info[elts[0]] = self.parse_formatdata(elts[0], v, self._info, line)             # <<<<<<<<<<<<<<
  * 
  *         # Gracefully deal with absent FORMAT column
  */
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12);
-      __Pyx_GIVEREF(__pyx_t_12);
+      __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
       __Pyx_INCREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_12);
+      __Pyx_GIVEREF(__pyx_t_12);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      __pyx_t_12 = 0;
       __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_12 = 0;
+      __pyx_t_12 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_1, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
     }
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     goto __pyx_L42;
   }
   __pyx_L42:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":690
+  /* "cvcf.pyx":690
  * 
  *         # Gracefully deal with absent FORMAT column
  *         if cols[8] == "": format = []             # <<<<<<<<<<<<<<
  *         else: format = cols[8].split(':')
  * 
  */
-  __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_9 = PyObject_RichCompare(__pyx_t_11, ((PyObject *)__pyx_kp_s_1), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  if (__pyx_t_8) {
-    __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_12 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_kp_s_1), Py_EQ); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  if (__pyx_t_7) {
+    __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
     __Pyx_DECREF(__pyx_v_format);
-    __pyx_v_format = ((PyObject *)__pyx_t_9);
-    __pyx_t_9 = 0;
+    __pyx_v_format = ((PyObject *)__pyx_t_12);
+    __pyx_t_12 = 0;
     goto __pyx_L46;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":691
+    /* "cvcf.pyx":691
  *         # Gracefully deal with absent FORMAT column
  *         if cols[8] == "": format = []
  *         else: format = cols[8].split(':')             # <<<<<<<<<<<<<<
  * 
  *         # check: all filters are defined
  */
-    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_11 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__split); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __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 = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_2 = PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
+    __pyx_t_10 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     __Pyx_DECREF(__pyx_v_format);
-    __pyx_v_format = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_v_format = __pyx_t_12;
+    __pyx_t_12 = 0;
   }
   __pyx_L46:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":694
+  /* "cvcf.pyx":694
  * 
  *         # check: all filters are defined
  *         for f in filter:             # <<<<<<<<<<<<<<
@@ -13900,69 +13708,69 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  * 
  */
   if (PyList_CheckExact(__pyx_v_filter) || PyTuple_CheckExact(__pyx_v_filter)) {
-    __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_12);
   } else {
-    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
   }
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
+    if (likely(PyList_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
     } else {
-      __pyx_t_9 = PyIter_Next(__pyx_t_2);
-      if (!__pyx_t_9) {
+      __pyx_t_10 = PyIter_Next(__pyx_t_12);
+      if (!__pyx_t_10) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(__pyx_t_10);
     }
     __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __pyx_v_f = __pyx_t_10;
+    __pyx_t_10 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":695
+    /* "cvcf.pyx":695
  *         # check: all filters are defined
  *         for f in filter:
  *             if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
  * 
  *         # check: format fields are defined
  */
-    __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_8 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_9, __pyx_v_f))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    if (__pyx_t_8) {
-      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_7 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_10, __pyx_v_f))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    if (__pyx_t_7) {
+      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_11));
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
-      __Pyx_GIVEREF(__pyx_t_11);
+      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
       __Pyx_INCREF(__pyx_v_f);
-      PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_f);
+      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
-      __pyx_t_11 = 0;
-      __pyx_t_11 = PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __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_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L49;
     }
     __pyx_L49:;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":698
+  /* "cvcf.pyx":698
  * 
  *         # check: format fields are defined
  *         for f in format:             # <<<<<<<<<<<<<<
@@ -13970,129 +13778,129 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  * 
  */
   if (PyList_CheckExact(__pyx_v_format) || PyTuple_CheckExact(__pyx_v_format)) {
-    __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_format; __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_format; __Pyx_INCREF(__pyx_t_12);
   } else {
-    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_format); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
   }
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_11 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++;
+    if (likely(PyList_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
     } else {
-      __pyx_t_11 = PyIter_Next(__pyx_t_2);
-      if (!__pyx_t_11) {
+      __pyx_t_1 = PyIter_Next(__pyx_t_12);
+      if (!__pyx_t_1) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_GOTREF(__pyx_t_1);
     }
     __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_11;
-    __pyx_t_11 = 0;
+    __pyx_v_f = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":699
+    /* "cvcf.pyx":699
  *         # check: format fields are defined
  *         for f in format:
  *             if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
  * 
  *         # convert v3.3 alleles
  */
-    __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_8 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_11, __pyx_v_f))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    if (__pyx_t_8) {
-      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_1, __pyx_v_f))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_7) {
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
-      __Pyx_GIVEREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
+      __Pyx_GIVEREF(__pyx_t_11);
       __Pyx_INCREF(__pyx_v_f);
-      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_f);
+      PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
-      __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_11 = 0;
+      __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       goto __pyx_L52;
     }
     __pyx_L52:;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":702
+  /* "cvcf.pyx":702
  * 
  *         # convert v3.3 alleles
  *         if self._version == 33:             # <<<<<<<<<<<<<<
  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
  *             newalts = []
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_10 = PyObject_RichCompare(__pyx_t_2, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (__pyx_t_8) {
+  __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  if (__pyx_t_7) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":703
+    /* "cvcf.pyx":703
  *         # convert v3.3 alleles
  *         if self._version == 33:
  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)             # <<<<<<<<<<<<<<
  *             newalts = []
  *             have_deletions = False
  */
-    __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = (__pyx_t_5 != 1);
-    if (__pyx_t_8) {
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = (__pyx_t_4 != 1);
+    if (__pyx_t_7) {
+      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_REF); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_12);
+      __Pyx_GIVEREF(__pyx_t_12);
+      __pyx_t_12 = 0;
+      __pyx_t_12 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       goto __pyx_L54;
     }
     __pyx_L54:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":704
+    /* "cvcf.pyx":704
  *         if self._version == 33:
  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
  *             newalts = []             # <<<<<<<<<<<<<<
  *             have_deletions = False
  *             for a in alt:
  */
-    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
     __Pyx_DECREF(((PyObject *)__pyx_v_newalts));
-    __pyx_v_newalts = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_v_newalts = __pyx_t_12;
+    __pyx_t_12 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":705
+    /* "cvcf.pyx":705
  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
  *             newalts = []
  *             have_deletions = False             # <<<<<<<<<<<<<<
@@ -14101,7 +13909,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     __pyx_v_have_deletions = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":706
+    /* "cvcf.pyx":706
  *             newalts = []
  *             have_deletions = False
  *             for a in alt:             # <<<<<<<<<<<<<<
@@ -14109,115 +13917,103 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  */
     if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-      __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+      __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
     } else {
-      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); 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 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
+      if (likely(PyList_CheckExact(__pyx_t_12))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
       } else {
-        __pyx_t_9 = PyIter_Next(__pyx_t_2);
-        if (!__pyx_t_9) {
+        __pyx_t_10 = PyIter_Next(__pyx_t_12);
+        if (!__pyx_t_10) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_10);
       }
       __Pyx_DECREF(__pyx_v_a);
-      __pyx_v_a = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __pyx_v_a = __pyx_t_10;
+      __pyx_t_10 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":707
+      /* "cvcf.pyx":707
  *             have_deletions = False
  *             for a in alt:
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference             # <<<<<<<<<<<<<<
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  */
-      __pyx_t_4 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_8 = (__pyx_t_4 == 1);
-      if (__pyx_t_8) {
-        __pyx_t_9 = PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_10 = PyNumber_Add(__pyx_v_a, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = (__pyx_t_3 == 1);
+      if (__pyx_t_7) {
+        __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_11 = PyNumber_Add(__pyx_v_a, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_v_a);
-        __pyx_v_a = __pyx_t_10;
-        __pyx_t_10 = 0;
+        __pyx_v_a = __pyx_t_11;
+        __pyx_t_11 = 0;
         goto __pyx_L57;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":708
+      /* "cvcf.pyx":708
  *             for a in alt:
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference             # <<<<<<<<<<<<<<
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True
  */
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
-      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_s__I));
-      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
-      __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      if (__pyx_t_8) {
-        __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      if (__pyx_t_7) {
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_11 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_11);
-        __pyx_t_9 = PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_10 = PyNumber_Add(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_1 = PyNumber_Add(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __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_11); __pyx_t_11 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_11);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
         __Pyx_DECREF(__pyx_v_a);
-        __pyx_v_a = __pyx_t_11;
-        __pyx_t_11 = 0;
+        __pyx_v_a = __pyx_t_10;
+        __pyx_t_10 = 0;
         goto __pyx_L57;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":709
+      /* "cvcf.pyx":709
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  *                 elif a.startswith('D'): # allow D<seq> and D<num>             # <<<<<<<<<<<<<<
  *                     have_deletions = True
  *                     try:
  */
-      __pyx_t_11 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
-      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_s__D));
-      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
-      __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_110), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      if (__pyx_t_8) {
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      if (__pyx_t_7) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":710
+        /* "cvcf.pyx":710
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True             # <<<<<<<<<<<<<<
@@ -14226,7 +14022,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
         __pyx_v_have_deletions = 1;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":711
+        /* "cvcf.pyx":711
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True
  *                     try:             # <<<<<<<<<<<<<<
@@ -14241,99 +14037,99 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
           __Pyx_XGOTREF(__pyx_save_exc_tb);
           /*try:*/ {
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":712
+            /* "cvcf.pyx":712
  *                     have_deletions = True
  *                     try:
  *                         l = int(a[1:])          # throws ValueError if sequence             # <<<<<<<<<<<<<<
  *                         if len(ref) < l:        # add to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  */
-            __pyx_t_10 = PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __Pyx_GOTREF(__pyx_t_9);
-            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
-            __Pyx_GIVEREF(__pyx_t_10);
-            __pyx_t_10 = 0;
-            __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+            __pyx_t_11 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __Pyx_GOTREF(__pyx_t_11);
+            __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __Pyx_GOTREF(((PyObject *)__pyx_t_10));
+            PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
+            __Pyx_GIVEREF(__pyx_t_11);
+            __pyx_t_11 = 0;
+            __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __Pyx_GOTREF(__pyx_t_11);
+            __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
             __Pyx_DECREF(__pyx_v_l);
-            __pyx_v_l = __pyx_t_10;
-            __pyx_t_10 = 0;
+            __pyx_v_l = __pyx_t_11;
+            __pyx_t_11 = 0;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":713
+            /* "cvcf.pyx":713
  *                     try:
  *                         l = int(a[1:])          # throws ValueError if sequence
  *                         if len(ref) < l:        # add to reference if necessary             # <<<<<<<<<<<<<<
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  *                             ref += addns
  */
-            __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __Pyx_GOTREF(__pyx_t_11);
+            __pyx_t_10 = PyObject_RichCompare(__pyx_t_11, __pyx_v_l, Py_LT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
             __Pyx_GOTREF(__pyx_t_10);
-            __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_v_l, Py_LT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
             __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-            if (__pyx_t_8) {
+            if (__pyx_t_7) {
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":714
+              /* "cvcf.pyx":714
  *                         l = int(a[1:])          # throws ValueError if sequence
  *                         if len(ref) < l:        # add to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)             # <<<<<<<<<<<<<<
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  */
-              __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __Pyx_GOTREF(__pyx_t_9);
-              __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
               __Pyx_GOTREF(__pyx_t_10);
-              __pyx_t_11 = PyNumber_Add(__pyx_v_pos, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
               __Pyx_GOTREF(__pyx_t_11);
-              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-              __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __Pyx_GOTREF(__pyx_t_10);
-              __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __Pyx_GOTREF(__pyx_t_12);
-              __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __Pyx_GOTREF(__pyx_t_3);
+              __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __Pyx_GOTREF(__pyx_t_1);
+              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+              __pyx_t_11 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __Pyx_GOTREF(__pyx_t_11);
+              __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __Pyx_GOTREF(__pyx_t_9);
+              __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __Pyx_GOTREF(((PyObject *)__pyx_t_2));
               __Pyx_INCREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chrom);
+              PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
               __Pyx_GIVEREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11);
+              PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+              __Pyx_GIVEREF(__pyx_t_1);
+              PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_11);
               __Pyx_GIVEREF(__pyx_t_11);
-              PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_10);
-              __Pyx_GIVEREF(__pyx_t_10);
-              PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_12);
-              __Pyx_GIVEREF(__pyx_t_12);
+              PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_9);
+              __Pyx_GIVEREF(__pyx_t_9);
+              __pyx_t_1 = 0;
               __pyx_t_11 = 0;
-              __pyx_t_10 = 0;
-              __pyx_t_12 = 0;
-              __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __Pyx_GOTREF(__pyx_t_12);
-              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+              __pyx_t_9 = 0;
+              __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __Pyx_GOTREF(__pyx_t_9);
+              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+              __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
               __Pyx_DECREF(__pyx_v_addns);
-              __pyx_v_addns = __pyx_t_12;
-              __pyx_t_12 = 0;
+              __pyx_v_addns = __pyx_t_9;
+              __pyx_t_9 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":715
+              /* "cvcf.pyx":715
  *                         if len(ref) < l:        # add to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  *                             ref += addns             # <<<<<<<<<<<<<<
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
  */
-              __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              __Pyx_GOTREF(__pyx_t_12);
+              __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+              __Pyx_GOTREF(__pyx_t_9);
               __Pyx_DECREF(__pyx_v_ref);
-              __pyx_v_ref = __pyx_t_12;
-              __pyx_t_12 = 0;
+              __pyx_v_ref = __pyx_t_9;
+              __pyx_t_9 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":716
+              /* "cvcf.pyx":716
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
@@ -14341,64 +14137,60 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                     except ValueError:
  */
               __Pyx_INCREF(__pyx_int_0);
-              __pyx_t_12 = __pyx_int_0;
-              if (likely(((PyObject *)__pyx_v_newalts) != Py_None)) {
-                __pyx_t_4 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_3);
-              } else {
-                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-              }
+              __pyx_t_9 = __pyx_int_0;
+              __pyx_t_3 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_2);
               for (;;) {
-                if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
-                __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++;
+                if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+                __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_10); __pyx_t_3++;
                 __Pyx_DECREF(__pyx_v_na);
-                __pyx_v_na = __pyx_t_9;
-                __pyx_t_9 = 0;
-                __Pyx_INCREF(__pyx_t_12);
+                __pyx_v_na = __pyx_t_10;
+                __pyx_t_10 = 0;
+                __Pyx_INCREF(__pyx_t_9);
                 __Pyx_DECREF(__pyx_v_i);
-                __pyx_v_i = __pyx_t_12;
-                __pyx_t_9 = PyNumber_Add(__pyx_t_12, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-                __Pyx_GOTREF(__pyx_t_9);
-                __Pyx_DECREF(__pyx_t_12);
-                __pyx_t_12 = __pyx_t_9;
-                __pyx_t_9 = 0;
-                __pyx_t_9 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-                __Pyx_GOTREF(__pyx_t_9);
-                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+                __pyx_v_i = __pyx_t_9;
+                __pyx_t_10 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+                __Pyx_GOTREF(__pyx_t_10);
+                __Pyx_DECREF(__pyx_t_9);
+                __pyx_t_9 = __pyx_t_10;
+                __pyx_t_10 = 0;
+                __pyx_t_10 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+                __Pyx_GOTREF(__pyx_t_10);
+                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
               }
-              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
               goto __pyx_L66;
             }
             __pyx_L66:;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":717
+            /* "cvcf.pyx":717
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l             # <<<<<<<<<<<<<<
  *                     except ValueError:
  *                         s = a[1:]
  */
-            __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_l); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __pyx_t_12 = PySequence_GetSlice(__pyx_v_ref, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
-            __Pyx_GOTREF(__pyx_t_12);
+            __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_l); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L58_error;}
+            __Pyx_GOTREF(__pyx_t_9);
             __Pyx_DECREF(__pyx_v_a);
-            __pyx_v_a = __pyx_t_12;
-            __pyx_t_12 = 0;
+            __pyx_v_a = __pyx_t_9;
+            __pyx_t_9 = 0;
           }
           __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
           __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
           __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
           goto __pyx_L65_try_end;
           __pyx_L58_error:;
+          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
           __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
           __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
           __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":718
+          /* "cvcf.pyx":718
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
  *                     except ValueError:             # <<<<<<<<<<<<<<
@@ -14408,180 +14200,180 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
           __pyx_t_16 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
           if (__pyx_t_16) {
             __Pyx_AddTraceback("cvcf.VCF.parse_data");
-            if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_3, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-            __Pyx_GOTREF(__pyx_t_12);
-            __Pyx_GOTREF(__pyx_t_3);
+            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
             __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_GOTREF(__pyx_t_2);
+            __Pyx_GOTREF(__pyx_t_10);
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":719
+            /* "cvcf.pyx":719
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
  *                     except ValueError:
  *                         s = a[1:]             # <<<<<<<<<<<<<<
  *                         if len(ref) < len(s):   # add Ns to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  */
-            __pyx_t_10 = PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-            __Pyx_GOTREF(__pyx_t_10);
+            __pyx_t_11 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+            __Pyx_GOTREF(__pyx_t_11);
             __Pyx_DECREF(__pyx_v_s);
-            __pyx_v_s = __pyx_t_10;
-            __pyx_t_10 = 0;
+            __pyx_v_s = __pyx_t_11;
+            __pyx_t_11 = 0;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":720
+            /* "cvcf.pyx":720
  *                     except ValueError:
  *                         s = a[1:]
  *                         if len(ref) < len(s):   # add Ns to reference if necessary             # <<<<<<<<<<<<<<
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  */
-            __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+            __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
             __pyx_t_17 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-            __pyx_t_8 = (__pyx_t_4 < __pyx_t_17);
-            if (__pyx_t_8) {
+            __pyx_t_7 = (__pyx_t_3 < __pyx_t_17);
+            if (__pyx_t_7) {
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":721
+              /* "cvcf.pyx":721
  *                         s = a[1:]
  *                         if len(ref) < len(s):   # add Ns to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)             # <<<<<<<<<<<<<<
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
  */
-              __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_10);
-              __pyx_t_17 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
               __Pyx_GOTREF(__pyx_t_11);
-              __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __pyx_t_17 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+              __pyx_t_8 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __Pyx_GOTREF(__pyx_t_8);
+              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
               __pyx_t_17 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_11);
-              __pyx_t_18 = PyNumber_Add(__pyx_v_pos, __pyx_t_11); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __Pyx_GOTREF(__pyx_t_1);
+              __pyx_t_18 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
               __Pyx_GOTREF(__pyx_t_18);
-              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-              __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_11);
+              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+              __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __Pyx_GOTREF(__pyx_t_1);
               __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_19);
+              __Pyx_GOTREF(((PyObject *)__pyx_t_19));
               __Pyx_INCREF(__pyx_v_chrom);
               PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_chrom);
               __Pyx_GIVEREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_1);
-              __Pyx_GIVEREF(__pyx_t_1);
+              PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_8);
+              __Pyx_GIVEREF(__pyx_t_8);
               PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_18);
               __Pyx_GIVEREF(__pyx_t_18);
-              PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_11);
-              __Pyx_GIVEREF(__pyx_t_11);
-              __pyx_t_1 = 0;
+              PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_1);
+              __Pyx_GIVEREF(__pyx_t_1);
+              __pyx_t_8 = 0;
               __pyx_t_18 = 0;
-              __pyx_t_11 = 0;
-              __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_11);
-              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+              __pyx_t_1 = 0;
+              __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __Pyx_GOTREF(__pyx_t_1);
+              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+              __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
               __Pyx_DECREF(__pyx_v_addns);
-              __pyx_v_addns = __pyx_t_11;
-              __pyx_t_11 = 0;
+              __pyx_v_addns = __pyx_t_1;
+              __pyx_t_1 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":722
+              /* "cvcf.pyx":722
  *                         if len(ref) < len(s):   # add Ns to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):             # <<<<<<<<<<<<<<
  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  */
-              __pyx_t_11 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__endswith); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_11);
+              __pyx_t_1 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __Pyx_GOTREF(__pyx_t_1);
               __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_19);
+              __Pyx_GOTREF(((PyObject *)__pyx_t_19));
               __Pyx_INCREF(__pyx_v_addns);
               PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_addns);
               __Pyx_GIVEREF(__pyx_v_addns);
-              __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_t_19, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_GOTREF(__pyx_t_10);
+              __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+              __Pyx_GOTREF(__pyx_t_11);
+              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+              __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
+              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
               __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
-              __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-              __pyx_t_6 = (!__pyx_t_8);
-              if (__pyx_t_6) {
+              __pyx_t_5 = (!__pyx_t_7);
+              if (__pyx_t_5) {
                 __pyx_t_17 = PyObject_Length(__pyx_v_addns); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_10);
-                __pyx_t_19 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_10); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_11);
+                __pyx_t_19 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_11); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(((PyObject *)__pyx_t_19));
-                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-                __pyx_t_10 = PyObject_RichCompare(__pyx_v_addns, ((PyObject *)__pyx_t_19), Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_10);
+                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+                __pyx_t_11 = PyObject_RichCompare(__pyx_v_addns, ((PyObject *)__pyx_t_19), Py_NE); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_11);
                 __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
-                __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-                __pyx_t_15 = __pyx_t_8;
+                __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+                __pyx_t_15 = __pyx_t_7;
               } else {
-                __pyx_t_15 = __pyx_t_6;
+                __pyx_t_15 = __pyx_t_5;
               }
               if (__pyx_t_15) {
 
-                /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":723
+                /* "cvcf.pyx":723
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  *                                 self.error(line,self.V33_UNMATCHED_DELETION,             # <<<<<<<<<<<<<<
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  *                             ref += addns
  */
-                __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_10);
-                __pyx_t_19 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_65); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_11);
+                __pyx_t_19 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_111); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(__pyx_t_19);
 
-                /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":724
+                /* "cvcf.pyx":724
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))             # <<<<<<<<<<<<<<
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  */
-                __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_11);
+                __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_1);
                 __pyx_t_17 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(__pyx_t_18);
-                __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
+                __pyx_t_8 = PyNumber_Add(__pyx_v_pos, __pyx_t_18); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_8);
                 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                 __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(__pyx_t_18);
                 __pyx_t_20 = PyTuple_New(4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_20);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_20));
                 __Pyx_INCREF(__pyx_v_chrom);
                 PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_chrom);
                 __Pyx_GIVEREF(__pyx_v_chrom);
                 __Pyx_INCREF(__pyx_v_pos);
                 PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_pos);
                 __Pyx_GIVEREF(__pyx_v_pos);
-                PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_1);
-                __Pyx_GIVEREF(__pyx_t_1);
+                PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_8);
+                __Pyx_GIVEREF(__pyx_t_8);
                 PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_18);
                 __Pyx_GIVEREF(__pyx_t_18);
-                __pyx_t_1 = 0;
+                __pyx_t_8 = 0;
                 __pyx_t_18 = 0;
-                __pyx_t_18 = PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __pyx_t_18 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(__pyx_t_18);
-                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+                __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
                 __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_20);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_20));
                 __Pyx_INCREF(__pyx_v_a);
                 PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_a);
                 __Pyx_GIVEREF(__pyx_v_a);
                 PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_18);
                 __Pyx_GIVEREF(__pyx_t_18);
                 __pyx_t_18 = 0;
-                __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_66), __pyx_t_20); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_112), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(((PyObject *)__pyx_t_18));
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+                __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
                 __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_20);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_20));
                 __Pyx_INCREF(__pyx_v_line);
                 PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_line);
                 __Pyx_GIVEREF(__pyx_v_line);
@@ -14591,16 +14383,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
                 __Pyx_GIVEREF(((PyObject *)__pyx_t_18));
                 __pyx_t_19 = 0;
                 __pyx_t_18 = 0;
-                __pyx_t_18 = PyObject_Call(__pyx_t_10, __pyx_t_20, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __pyx_t_18 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
                 __Pyx_GOTREF(__pyx_t_18);
-                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+                __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
                 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                 goto __pyx_L72;
               }
               __pyx_L72:;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":725
+              /* "cvcf.pyx":725
  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  *                             ref += addns             # <<<<<<<<<<<<<<
@@ -14613,7 +14405,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
               __pyx_v_ref = __pyx_t_18;
               __pyx_t_18 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":726
+              /* "cvcf.pyx":726
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
@@ -14622,29 +14414,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
               __Pyx_INCREF(__pyx_int_0);
               __pyx_t_18 = __pyx_int_0;
-              if (likely(((PyObject *)__pyx_v_newalts) != Py_None)) {
-                __pyx_t_17 = 0; __pyx_t_20 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_20);
-              } else {
-                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-              }
+              __pyx_t_17 = 0; __pyx_t_20 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_20);
               for (;;) {
                 if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_20)) break;
-                __pyx_t_10 = PyList_GET_ITEM(__pyx_t_20, __pyx_t_17); __Pyx_INCREF(__pyx_t_10); __pyx_t_17++;
+                __pyx_t_11 = PyList_GET_ITEM(__pyx_t_20, __pyx_t_17); __Pyx_INCREF(__pyx_t_11); __pyx_t_17++;
                 __Pyx_DECREF(__pyx_v_na);
-                __pyx_v_na = __pyx_t_10;
-                __pyx_t_10 = 0;
+                __pyx_v_na = __pyx_t_11;
+                __pyx_t_11 = 0;
                 __Pyx_INCREF(__pyx_t_18);
                 __Pyx_DECREF(__pyx_v_i);
                 __pyx_v_i = __pyx_t_18;
-                __pyx_t_10 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_10);
+                __pyx_t_11 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_11);
                 __Pyx_DECREF(__pyx_t_18);
-                __pyx_t_18 = __pyx_t_10;
-                __pyx_t_10 = 0;
-                __pyx_t_10 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_GOTREF(__pyx_t_10);
-                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+                __pyx_t_18 = __pyx_t_11;
+                __pyx_t_11 = 0;
+                __pyx_t_11 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_GOTREF(__pyx_t_11);
+                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
               }
               __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
               __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
@@ -14652,7 +14440,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
             }
             __pyx_L71:;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":727
+            /* "cvcf.pyx":727
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[len(s):]        # new deletion, deleting from pos             # <<<<<<<<<<<<<<
@@ -14660,14 +14448,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                     self.error(line,self.V33_BAD_ALLELE)
  */
             __pyx_t_17 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
-            __pyx_t_18 = PySequence_GetSlice(__pyx_v_ref, __pyx_t_17, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
+            __pyx_t_18 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_17, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L60_except_error;}
             __Pyx_GOTREF(__pyx_t_18);
             __Pyx_DECREF(__pyx_v_a);
             __pyx_v_a = __pyx_t_18;
             __pyx_t_18 = 0;
-            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
             __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
             goto __pyx_L59_exception_handled;
           }
           __pyx_L60_except_error:;
@@ -14687,34 +14475,34 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":729
+        /* "cvcf.pyx":729
  *                         a = ref[len(s):]        # new deletion, deleting from pos
  *                 else:
  *                     self.error(line,self.V33_BAD_ALLELE)             # <<<<<<<<<<<<<<
  *                 newalts.append(a)
  *             alt = newalts
  */
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_ALLELE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_ALLELE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_3);
-        __Pyx_GIVEREF(__pyx_t_3);
-        __pyx_t_3 = 0;
-        __pyx_t_3 = PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
       __pyx_L57:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":730
+      /* "cvcf.pyx":730
  *                 else:
  *                     self.error(line,self.V33_BAD_ALLELE)
  *                 newalts.append(a)             # <<<<<<<<<<<<<<
@@ -14724,11 +14512,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       if (unlikely(__pyx_v_newalts == Py_None)) {
         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
-      __pyx_t_16 = PyList_Append(((PyObject *)__pyx_v_newalts), __pyx_v_a); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_16 = PyList_Append(__pyx_v_newalts, __pyx_v_a); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":731
+    /* "cvcf.pyx":731
  *                     self.error(line,self.V33_BAD_ALLELE)
  *                 newalts.append(a)
  *             alt = newalts             # <<<<<<<<<<<<<<
@@ -14739,7 +14527,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __Pyx_DECREF(__pyx_v_alt);
     __pyx_v_alt = ((PyObject *)__pyx_v_newalts);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":733
+    /* "cvcf.pyx":733
  *             alt = newalts
  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
  *             if have_deletions:             # <<<<<<<<<<<<<<
@@ -14748,231 +14536,231 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     if (__pyx_v_have_deletions) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":734
+      /* "cvcf.pyx":734
  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
  *             if have_deletions:
  *                 if pos == 0:             # <<<<<<<<<<<<<<
  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
  */
-      __pyx_t_2 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_12 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       if (__pyx_t_15) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":736
+        /* "cvcf.pyx":736
  *                 if pos == 0:
  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)             # <<<<<<<<<<<<<<
  *                     ref += addn
  *                     alt = [allele+addn for allele in alt]
  */
-        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_12 = PyNumber_Add(__pyx_v_pos, __pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_12);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_9 = PyNumber_Add(__pyx_v_pos, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_3 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_9 = PyNumber_Add(__pyx_v_pos, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_18);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_18));
         __Pyx_INCREF(__pyx_v_chrom);
         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_12);
-        __Pyx_GIVEREF(__pyx_t_12);
-        PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_3);
-        __Pyx_GIVEREF(__pyx_t_3);
-        PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_9);
         __Pyx_GIVEREF(__pyx_t_9);
-        __pyx_t_12 = 0;
-        __pyx_t_3 = 0;
+        PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_10);
+        __Pyx_GIVEREF(__pyx_t_10);
         __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_t_18, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __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_18); __pyx_t_18 = 0;
+        __pyx_t_2 = 0;
+        __pyx_t_10 = 0;
+        __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
         __Pyx_DECREF(__pyx_v_addn);
-        __pyx_v_addn = __pyx_t_9;
-        __pyx_t_9 = 0;
+        __pyx_v_addn = __pyx_t_10;
+        __pyx_t_10 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":737
+        /* "cvcf.pyx":737
  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
  *                     ref += addn             # <<<<<<<<<<<<<<
  *                     alt = [allele+addn for allele in alt]
  *                 else:
  */
-        __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_9;
-        __pyx_t_9 = 0;
+        __pyx_v_ref = __pyx_t_10;
+        __pyx_t_10 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":738
+        /* "cvcf.pyx":738
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
  *                     ref += addn
  *                     alt = [allele+addn for allele in alt]             # <<<<<<<<<<<<<<
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  */
-        __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+        __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
         if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-          __pyx_t_5 = 0; __pyx_t_18 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_18);
+          __pyx_t_4 = 0; __pyx_t_18 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_18);
         } else {
-          __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_4 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_18);
         }
         for (;;) {
           if (likely(PyList_CheckExact(__pyx_t_18))) {
-            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break;
-            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+            if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_18)) break;
+            __pyx_t_12 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
           } else if (likely(PyTuple_CheckExact(__pyx_t_18))) {
-            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
-            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+            if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
+            __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
           } else {
-            __pyx_t_2 = PyIter_Next(__pyx_t_18);
-            if (!__pyx_t_2) {
+            __pyx_t_12 = PyIter_Next(__pyx_t_18);
+            if (!__pyx_t_12) {
               if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
               break;
             }
-            __Pyx_GOTREF(__pyx_t_2);
+            __Pyx_GOTREF(__pyx_t_12);
           }
           __Pyx_DECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_2;
-          __pyx_t_2 = 0;
-          __pyx_t_2 = PyNumber_Add(__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          if (unlikely(PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_v_allele = __pyx_t_12;
+          __pyx_t_12 = 0;
+          __pyx_t_12 = PyNumber_Add(__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          if (unlikely(PyList_Append(__pyx_t_10, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         }
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __Pyx_INCREF(((PyObject *)__pyx_t_9));
+        __Pyx_INCREF(((PyObject *)__pyx_t_10));
         __Pyx_DECREF(__pyx_v_alt);
-        __pyx_v_alt = ((PyObject *)__pyx_t_9);
-        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+        __pyx_v_alt = ((PyObject *)__pyx_t_10);
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
         goto __pyx_L76;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":740
+        /* "cvcf.pyx":740
  *                     alt = [allele+addn for allele in alt]
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)             # <<<<<<<<<<<<<<
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]
  */
-        __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_18 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
         __Pyx_INCREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chrom);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_18);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_18);
         __Pyx_GIVEREF(__pyx_t_18);
         __Pyx_INCREF(__pyx_v_pos);
-        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_pos);
+        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_pos);
         __Pyx_GIVEREF(__pyx_v_pos);
-        PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_12);
+        __Pyx_GIVEREF(__pyx_t_12);
         __pyx_t_18 = 0;
-        __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __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_3); __pyx_t_3 = 0;
+        __pyx_t_12 = 0;
+        __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_v_addn);
-        __pyx_v_addn = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_addn = __pyx_t_12;
+        __pyx_t_12 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":741
+        /* "cvcf.pyx":741
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  *                     ref = addn + ref             # <<<<<<<<<<<<<<
  *                     alt = [addn + allele for allele in alt]
  *                     pos -= 1
  */
-        __pyx_t_2 = PyNumber_Add(__pyx_v_addn, __pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_12 = PyNumber_Add(__pyx_v_addn, __pyx_v_ref); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
         __Pyx_DECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_ref = __pyx_t_12;
+        __pyx_t_12 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":742
+        /* "cvcf.pyx":742
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]             # <<<<<<<<<<<<<<
  *                     pos -= 1
  *         else:
  */
-        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+        __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_12));
         if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-          __pyx_t_5 = 0; __pyx_t_3 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_4 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
         } else {
-          __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
         }
         for (;;) {
-          if (likely(PyList_CheckExact(__pyx_t_3))) {
-            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
-            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
-          } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
-            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
+          if (likely(PyList_CheckExact(__pyx_t_2))) {
+            if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
+          } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
+            if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
           } else {
-            __pyx_t_9 = PyIter_Next(__pyx_t_3);
-            if (!__pyx_t_9) {
+            __pyx_t_10 = PyIter_Next(__pyx_t_2);
+            if (!__pyx_t_10) {
               if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
               break;
             }
-            __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_GOTREF(__pyx_t_10);
           }
           __Pyx_DECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_9;
-          __pyx_t_9 = 0;
-          __pyx_t_9 = PyNumber_Add(__pyx_v_addn, __pyx_v_allele); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_v_allele = __pyx_t_10;
+          __pyx_t_10 = 0;
+          __pyx_t_10 = PyNumber_Add(__pyx_v_addn, __pyx_v_allele); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          if (unlikely(PyList_Append(__pyx_t_12, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         }
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __Pyx_INCREF(((PyObject *)__pyx_t_2));
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_INCREF(((PyObject *)__pyx_t_12));
         __Pyx_DECREF(__pyx_v_alt);
-        __pyx_v_alt = ((PyObject *)__pyx_t_2);
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+        __pyx_v_alt = ((PyObject *)__pyx_t_12);
+        __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":743
+        /* "cvcf.pyx":743
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]
  *                     pos -= 1             # <<<<<<<<<<<<<<
  *         else:
  *             # format v4.0 -- just check for nucleotides
  */
-        __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); 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_12 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
         __Pyx_DECREF(__pyx_v_pos);
-        __pyx_v_pos = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_pos = __pyx_t_12;
+        __pyx_t_12 = 0;
       }
       __pyx_L76:;
       goto __pyx_L75;
@@ -14982,7 +14770,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":746
+    /* "cvcf.pyx":746
  *         else:
  *             # format v4.0 -- just check for nucleotides
  *             for allele in alt:             # <<<<<<<<<<<<<<
@@ -14990,57 +14778,57 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                     self.error(line,self.V40_BAD_ALLELE,allele)
  */
     if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-      __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+      __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
     } else {
-      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
+      if (likely(PyList_CheckExact(__pyx_t_12))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
       } else {
-        __pyx_t_3 = PyIter_Next(__pyx_t_2);
-        if (!__pyx_t_3) {
+        __pyx_t_2 = PyIter_Next(__pyx_t_12);
+        if (!__pyx_t_2) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_GOTREF(__pyx_t_2);
       }
       __Pyx_DECREF(__pyx_v_allele);
-      __pyx_v_allele = __pyx_t_3;
-      __pyx_t_3 = 0;
+      __pyx_v_allele = __pyx_t_2;
+      __pyx_t_2 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":747
+      /* "cvcf.pyx":747
  *             # format v4.0 -- just check for nucleotides
  *             for allele in alt:
  *                 if not alleleRegEx.match(allele):             # <<<<<<<<<<<<<<
  *                     self.error(line,self.V40_BAD_ALLELE,allele)
  * 
  */
-      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__alleleRegEx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__match); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __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 = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_INCREF(__pyx_v_allele);
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_allele);
+      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__alleleRegEx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_10 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__match); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __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 = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __Pyx_INCREF(__pyx_v_allele);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_allele);
       __Pyx_GIVEREF(__pyx_v_allele);
-      __pyx_t_18 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
       __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-      __pyx_t_6 = (!__pyx_t_15);
-      if (__pyx_t_6) {
+      __pyx_t_5 = (!__pyx_t_15);
+      if (__pyx_t_5) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":748
+        /* "cvcf.pyx":748
  *             for allele in alt:
  *                 if not alleleRegEx.match(allele):
  *                     self.error(line,self.V40_BAD_ALLELE,allele)             # <<<<<<<<<<<<<<
@@ -15049,33 +14837,33 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
         __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V40_BAD_ALLELE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V40_BAD_ALLELE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
-        __Pyx_GIVEREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
         __Pyx_INCREF(__pyx_v_allele);
-        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_allele);
+        PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_allele);
         __Pyx_GIVEREF(__pyx_v_allele);
-        __pyx_t_3 = 0;
-        __pyx_t_3 = PyObject_Call(__pyx_t_18, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         goto __pyx_L83;
       }
       __pyx_L83:;
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   }
   __pyx_L53:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":751
+  /* "cvcf.pyx":751
  * 
  *         # check for leading nucleotide in indel calls
  *         for allele in alt:             # <<<<<<<<<<<<<<
@@ -15083,31 +14871,31 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
  */
   if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-    __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
   } else {
-    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
   }
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
+    if (likely(PyList_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
     } else {
-      __pyx_t_3 = PyIter_Next(__pyx_t_2);
-      if (!__pyx_t_3) {
+      __pyx_t_2 = PyIter_Next(__pyx_t_12);
+      if (!__pyx_t_2) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(__pyx_t_2);
     }
     __Pyx_DECREF(__pyx_v_allele);
-    __pyx_v_allele = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_v_allele = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":752
+    /* "cvcf.pyx":752
  *         # check for leading nucleotide in indel calls
  *         for allele in alt:
  *             if len(allele) != len(ref):             # <<<<<<<<<<<<<<
@@ -15115,116 +14903,116 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
  */
     __pyx_t_17 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = (__pyx_t_17 != __pyx_t_4);
-    if (__pyx_t_6) {
+    __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = (__pyx_t_17 != __pyx_t_3);
+    if (__pyx_t_5) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":753
+      /* "cvcf.pyx":753
  *         for allele in alt:
  *             if len(allele) != len(ref):
  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)             # <<<<<<<<<<<<<<
  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
  *                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
  */
-      __pyx_t_4 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = (__pyx_t_4 == 0);
-      if (__pyx_t_6) {
-        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ZERO_LENGTH_ALLELE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = (__pyx_t_3 == 0);
+      if (__pyx_t_5) {
+        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ZERO_LENGTH_ALLELE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_18);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_18));
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_9);
-        __Pyx_GIVEREF(__pyx_t_9);
-        __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_3, __pyx_t_18, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_10);
+        __Pyx_GIVEREF(__pyx_t_10);
+        __pyx_t_10 = 0;
+        __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         goto __pyx_L87;
       }
       __pyx_L87:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":754
+      /* "cvcf.pyx":754
  *             if len(allele) != len(ref):
  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():             # <<<<<<<<<<<<<<
  *                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
  * 
  */
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_18 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_18 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
       __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__upper); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-      __pyx_t_18 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_t_18, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_t_18, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      if (__pyx_t_6) {
-        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_5) {
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __pyx_t_9 = PyNumber_Add(__pyx_t_3, __pyx_t_18); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_10 = PyNumber_Add(__pyx_t_2, __pyx_t_18); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __pyx_t_18 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_18 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __pyx_t_15 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_9, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_8 = __pyx_t_15;
+        __pyx_t_15 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_10, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_7 = __pyx_t_15;
       } else {
-        __pyx_t_8 = __pyx_t_6;
+        __pyx_t_7 = __pyx_t_5;
       }
-      if (__pyx_t_8) {
+      if (__pyx_t_7) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":755
+        /* "cvcf.pyx":755
  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
  *                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)             # <<<<<<<<<<<<<<
  * 
  *         # trim trailing bases in alleles
  */
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_67); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_113); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_18);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_18);
         __Pyx_GIVEREF(__pyx_t_18);
         __pyx_t_18 = 0;
-        __pyx_t_18 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_18 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
         goto __pyx_L88;
       }
@@ -15233,171 +15021,181 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     }
     __pyx_L86:;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":758
+  /* "cvcf.pyx":758
  * 
  *         # trim trailing bases in alleles
  *         for i in range(1,min(len(ref),min(map(len,alt)))):             # <<<<<<<<<<<<<<
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
  *                 break
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
   __Pyx_INCREF(__pyx_builtin_len);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_len);
+  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_builtin_len);
   __Pyx_GIVEREF(__pyx_builtin_len);
   __Pyx_INCREF(__pyx_v_alt);
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_alt);
+  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_alt);
   __Pyx_GIVEREF(__pyx_v_alt);
-  __pyx_t_18 = PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_18 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_18);
-  __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 = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18);
+  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_18);
   __Pyx_GIVEREF(__pyx_t_18);
   __pyx_t_18 = 0;
-  __pyx_t_18 = PyObject_Call(__pyx_builtin_min, __pyx_t_2, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_18 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_18);
+  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+  __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_10 = PyObject_RichCompare(__pyx_t_18, __pyx_t_2, Py_LT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_9 = PyObject_RichCompare(__pyx_t_18, __pyx_t_3, Py_LT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  if (__pyx_t_8) {
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  if (__pyx_t_7) {
     __Pyx_INCREF(__pyx_t_18);
-    __pyx_t_2 = __pyx_t_18;
+    __pyx_t_12 = __pyx_t_18;
   } else {
-    __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_2 = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_12 = __pyx_t_10;
+    __pyx_t_10 = 0;
   }
   __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
   __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_18);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_18));
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, __pyx_t_18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-    __pyx_t_5 = 0; __pyx_t_18 = __pyx_t_2; __Pyx_INCREF(__pyx_t_18);
+  __Pyx_INCREF(__pyx_t_12);
+  PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_12);
+  __Pyx_GIVEREF(__pyx_t_12);
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  __pyx_t_12 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+  if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) {
+    __pyx_t_4 = 0; __pyx_t_18 = __pyx_t_12; __Pyx_INCREF(__pyx_t_18);
   } else {
-    __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_18);
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   for (;;) {
     if (likely(PyList_CheckExact(__pyx_t_18))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break;
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_18)) break;
+      __pyx_t_12 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
     } else if (likely(PyTuple_CheckExact(__pyx_t_18))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
+      __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
     } else {
-      __pyx_t_2 = PyIter_Next(__pyx_t_18);
-      if (!__pyx_t_2) {
+      __pyx_t_12 = PyIter_Next(__pyx_t_18);
+      if (!__pyx_t_12) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_12);
     }
     __Pyx_DECREF(__pyx_v_i);
-    __pyx_v_i = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_v_i = __pyx_t_12;
+    __pyx_t_12 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":759
+    /* "cvcf.pyx":759
  *         # trim trailing bases in alleles
  *         for i in range(1,min(len(ref),min(map(len,alt)))):
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():             # <<<<<<<<<<<<<<
  *                 break
  *             ref, alt = ref[:-1], [allele[:-1] for allele in alt]
  */
-    __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-      __pyx_t_4 = 0; __pyx_t_9 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_9);
-    } else {
-      __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-    }
-    for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_9))) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
-        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_9))) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
-        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
+    { /* enter inner scope */
+      PyObject *__pyx_7genexpr__pyx_v_allele;
+      __pyx_7genexpr__pyx_v_allele = Py_None; __Pyx_INCREF(Py_None);
+      __pyx_t_12 = PySet_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+      if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
+        __pyx_t_3 = 0; __pyx_t_10 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_10);
       } else {
-        __pyx_t_3 = PyIter_Next(__pyx_t_9);
-        if (!__pyx_t_3) {
-          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          break;
+        __pyx_t_3 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+      }
+      for (;;) {
+        if (likely(PyList_CheckExact(__pyx_t_10))) {
+          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_10)) break;
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
+        } else if (likely(PyTuple_CheckExact(__pyx_t_10))) {
+          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
+        } else {
+          __pyx_t_2 = PyIter_Next(__pyx_t_10);
+          if (!__pyx_t_2) {
+            if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_2);
         }
-        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_7genexpr__pyx_v_allele);
+        __pyx_7genexpr__pyx_v_allele = __pyx_t_2;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_7genexpr__pyx_v_allele, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        if (unlikely(PySet_Add(__pyx_t_12, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L94_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
-      __Pyx_DECREF(__pyx_8genexpr0__pyx_v_allele);
-      __pyx_8genexpr0__pyx_v_allele = __pyx_t_3;
-      __pyx_t_3 = 0;
-      __pyx_t_3 = __Pyx_GetItemInt(__pyx_8genexpr0__pyx_v_allele, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_12 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__upper); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_7genexpr__pyx_v_allele);
+      goto __pyx_L97_exit_scope;
+      __pyx_L94_error:;
+      __Pyx_DECREF(__pyx_7genexpr__pyx_v_allele);
+      goto __pyx_L1_error;
+      __pyx_L97_exit_scope:;
+    } /* exit inner scope */
+    __pyx_t_3 = PySet_Size(((PyObject *)__pyx_t_12)); 
+    __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+    __pyx_t_7 = (__pyx_t_3 > 1);
+    if (!__pyx_t_7) {
+      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_ref, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_12);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_10 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-      if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    }
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_4 = PySet_Size(((PyObject *)__pyx_t_2)); 
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_t_8 = (__pyx_t_4 > 1);
-    if (!__pyx_t_8) {
-      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ref, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_alt, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_alt, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_15 = __pyx_t_6;
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_15 = __pyx_t_5;
     } else {
-      __pyx_t_15 = __pyx_t_8;
+      __pyx_t_15 = __pyx_t_7;
     }
     if (__pyx_t_15) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":760
+      /* "cvcf.pyx":760
  *         for i in range(1,min(len(ref),min(map(len,alt)))):
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
  *                 break             # <<<<<<<<<<<<<<
@@ -15409,61 +15207,61 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     }
     __pyx_L91:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":761
+    /* "cvcf.pyx":761
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
  *                 break
  *             ref, alt = ref[:-1], [allele[:-1] for allele in alt]             # <<<<<<<<<<<<<<
  * 
  *         # left-align alleles, if a reference is available
  */
-    __pyx_t_9 = PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
     if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-      __pyx_t_4 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+      __pyx_t_3 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
     } else {
-      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); 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_t_3 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
+      if (likely(PyList_CheckExact(__pyx_t_12))) {
+        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_12)) break;
+        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_3); __Pyx_INCREF(__pyx_t_9); __pyx_t_3++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_3); __Pyx_INCREF(__pyx_t_9); __pyx_t_3++;
       } else {
-        __pyx_t_12 = PyIter_Next(__pyx_t_2);
-        if (!__pyx_t_12) {
+        __pyx_t_9 = PyIter_Next(__pyx_t_12);
+        if (!__pyx_t_9) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
-        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_GOTREF(__pyx_t_9);
       }
       __Pyx_DECREF(__pyx_v_allele);
-      __pyx_v_allele = __pyx_t_12;
-      __pyx_t_12 = 0;
-      __pyx_t_12 = PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      if (unlikely(PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_v_allele = __pyx_t_9;
+      __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = ((PyObject *)__pyx_t_3);
-    __Pyx_INCREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __pyx_t_12 = ((PyObject *)__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_12);
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_v_ref);
-    __pyx_v_ref = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __pyx_v_ref = __pyx_t_10;
+    __pyx_t_10 = 0;
     __Pyx_DECREF(__pyx_v_alt);
-    __pyx_v_alt = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_v_alt = __pyx_t_12;
+    __pyx_t_12 = 0;
   }
   __pyx_L90_break:;
   __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":764
+  /* "cvcf.pyx":764
  * 
  *         # left-align alleles, if a reference is available
  *         if self._leftalign and self._reference:             # <<<<<<<<<<<<<<
@@ -15477,15 +15275,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   if (__pyx_t_15) {
     __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_18);
-    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-    __pyx_t_6 = __pyx_t_8;
+    __pyx_t_5 = __pyx_t_7;
   } else {
-    __pyx_t_6 = __pyx_t_15;
+    __pyx_t_5 = __pyx_t_15;
   }
-  if (__pyx_t_6) {
+  if (__pyx_t_5) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":765
+    /* "cvcf.pyx":765
  *         # left-align alleles, if a reference is available
  *         if self._leftalign and self._reference:
  *             while left < pos:             # <<<<<<<<<<<<<<
@@ -15495,11 +15293,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     while (1) {
       __pyx_t_18 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-      if (!__pyx_t_6) break;
+      if (!__pyx_t_5) break;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":766
+      /* "cvcf.pyx":766
  *         if self._leftalign and self._reference:
  *             while left < pos:
  *                 movable = True             # <<<<<<<<<<<<<<
@@ -15508,7 +15306,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
       __pyx_v_movable = 1;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":767
+      /* "cvcf.pyx":767
  *             while left < pos:
  *                 movable = True
  *                 for allele in alt:             # <<<<<<<<<<<<<<
@@ -15516,84 +15314,84 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                         longest, shortest = allele, ref
  */
       if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-        __pyx_t_5 = 0; __pyx_t_18 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_18);
+        __pyx_t_4 = 0; __pyx_t_18 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_18);
       } else {
-        __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
       }
       for (;;) {
         if (likely(PyList_CheckExact(__pyx_t_18))) {
-          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break;
-          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_18)) break;
+          __pyx_t_12 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
         } else if (likely(PyTuple_CheckExact(__pyx_t_18))) {
-          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
-          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
+          __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
         } else {
-          __pyx_t_2 = PyIter_Next(__pyx_t_18);
-          if (!__pyx_t_2) {
+          __pyx_t_12 = PyIter_Next(__pyx_t_18);
+          if (!__pyx_t_12) {
             if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             break;
           }
-          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_GOTREF(__pyx_t_12);
         }
         __Pyx_DECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_allele = __pyx_t_12;
+        __pyx_t_12 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":768
+        /* "cvcf.pyx":768
  *                 movable = True
  *                 for allele in alt:
  *                     if len(allele) > len(ref):             # <<<<<<<<<<<<<<
  *                         longest, shortest = allele, ref
  *                     else:
  */
-        __pyx_t_4 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __pyx_t_17 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_6 = (__pyx_t_4 > __pyx_t_17);
-        if (__pyx_t_6) {
+        __pyx_t_5 = (__pyx_t_3 > __pyx_t_17);
+        if (__pyx_t_5) {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":769
+          /* "cvcf.pyx":769
  *                 for allele in alt:
  *                     if len(allele) > len(ref):
  *                         longest, shortest = allele, ref             # <<<<<<<<<<<<<<
  *                     else:
  *                         longest, shortest = ref, allele
  */
-          __pyx_t_2 = __pyx_v_allele;
-          __Pyx_INCREF(__pyx_t_2);
-          __pyx_t_9 = __pyx_v_ref;
-          __Pyx_INCREF(__pyx_t_9);
+          __pyx_t_12 = __pyx_v_allele;
+          __Pyx_INCREF(__pyx_t_12);
+          __pyx_t_10 = __pyx_v_ref;
+          __Pyx_INCREF(__pyx_t_10);
           __Pyx_DECREF(__pyx_v_longest);
-          __pyx_v_longest = __pyx_t_2;
-          __pyx_t_2 = 0;
+          __pyx_v_longest = __pyx_t_12;
+          __pyx_t_12 = 0;
           __Pyx_DECREF(__pyx_v_shortest);
-          __pyx_v_shortest = __pyx_t_9;
-          __pyx_t_9 = 0;
-          goto __pyx_L101;
+          __pyx_v_shortest = __pyx_t_10;
+          __pyx_t_10 = 0;
+          goto __pyx_L105;
         }
         /*else*/ {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":771
+          /* "cvcf.pyx":771
  *                         longest, shortest = allele, ref
  *                     else:
  *                         longest, shortest = ref, allele             # <<<<<<<<<<<<<<
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
  *                         movable = False
  */
-          __pyx_t_9 = __pyx_v_ref;
-          __Pyx_INCREF(__pyx_t_9);
-          __pyx_t_2 = __pyx_v_allele;
-          __Pyx_INCREF(__pyx_t_2);
+          __pyx_t_10 = __pyx_v_ref;
+          __Pyx_INCREF(__pyx_t_10);
+          __pyx_t_12 = __pyx_v_allele;
+          __Pyx_INCREF(__pyx_t_12);
           __Pyx_DECREF(__pyx_v_longest);
-          __pyx_v_longest = __pyx_t_9;
-          __pyx_t_9 = 0;
+          __pyx_v_longest = __pyx_t_10;
+          __pyx_t_10 = 0;
           __Pyx_DECREF(__pyx_v_shortest);
-          __pyx_v_shortest = __pyx_t_2;
-          __pyx_t_2 = 0;
+          __pyx_v_shortest = __pyx_t_12;
+          __pyx_t_12 = 0;
         }
-        __pyx_L101:;
+        __pyx_L105:;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":772
+        /* "cvcf.pyx":772
  *                     else:
  *                         longest, shortest = ref, allele
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():             # <<<<<<<<<<<<<<
@@ -15601,36 +15399,36 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  */
         __pyx_t_17 = PyObject_Length(__pyx_v_longest); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_4 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_6 = (__pyx_t_17 == __pyx_t_4);
-        if (!__pyx_t_6) {
-          __pyx_t_4 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_2 = PySequence_GetSlice(__pyx_v_longest, 0, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = (__pyx_t_17 == __pyx_t_3);
+        if (!__pyx_t_5) {
+          __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_12 = __Pyx_PySequence_GetSlice(__pyx_v_longest, 0, __pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __pyx_t_10 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_10 = PyObject_GetAttr(__pyx_v_shortest, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_9 = PyObject_GetAttr(__pyx_v_shortest, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __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_3); __pyx_t_3 = 0;
-          __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_8 = __pyx_t_15;
+          __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_7 = __pyx_t_15;
         } else {
-          __pyx_t_8 = __pyx_t_6;
+          __pyx_t_7 = __pyx_t_5;
         }
-        if (__pyx_t_8) {
+        if (__pyx_t_7) {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":773
+          /* "cvcf.pyx":773
  *                         longest, shortest = ref, allele
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
  *                         movable = False             # <<<<<<<<<<<<<<
@@ -15638,44 +15436,44 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                         movable = False
  */
           __pyx_v_movable = 0;
-          goto __pyx_L102;
+          goto __pyx_L106;
         }
-        __pyx_L102:;
+        __pyx_L106:;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":774
+        /* "cvcf.pyx":774
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
  *                         movable = False
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():             # <<<<<<<<<<<<<<
  *                         movable = False
  *                 if not movable:
  */
-        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_longest, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_4 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_17 = (__pyx_t_4 - 1);
-        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_longest, __pyx_t_17, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_longest, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_2 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_17 = (__pyx_t_3 - 1);
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_longest, __pyx_t_17, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __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_3); __pyx_t_3 = 0;
-        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __pyx_t_12 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        if (__pyx_t_8) {
+        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        if (__pyx_t_7) {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":775
+          /* "cvcf.pyx":775
  *                         movable = False
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  *                         movable = False             # <<<<<<<<<<<<<<
@@ -15683,48 +15481,48 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *                     break
  */
           __pyx_v_movable = 0;
-          goto __pyx_L103;
+          goto __pyx_L107;
         }
-        __pyx_L103:;
+        __pyx_L107:;
       }
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":776
+      /* "cvcf.pyx":776
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  *                         movable = False
  *                 if not movable:             # <<<<<<<<<<<<<<
  *                     break
  *                 ref = ref[:-1]
  */
-      __pyx_t_8 = (!__pyx_v_movable);
-      if (__pyx_t_8) {
+      __pyx_t_7 = (!__pyx_v_movable);
+      if (__pyx_t_7) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":777
+        /* "cvcf.pyx":777
  *                         movable = False
  *                 if not movable:
  *                     break             # <<<<<<<<<<<<<<
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]
  */
-        goto __pyx_L98_break;
-        goto __pyx_L104;
+        goto __pyx_L102_break;
+        goto __pyx_L108;
       }
-      __pyx_L104:;
+      __pyx_L108:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":778
+      /* "cvcf.pyx":778
  *                 if not movable:
  *                     break
  *                 ref = ref[:-1]             # <<<<<<<<<<<<<<
  *                 alt = [allele[:-1] for allele in alt]
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  */
-      __pyx_t_18 = PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
       __Pyx_DECREF(__pyx_v_ref);
       __pyx_v_ref = __pyx_t_18;
       __pyx_t_18 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":779
+      /* "cvcf.pyx":779
  *                     break
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]             # <<<<<<<<<<<<<<
@@ -15734,41 +15532,41 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_18));
       if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-        __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+        __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
       } else {
-        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
       }
       for (;;) {
-        if (likely(PyList_CheckExact(__pyx_t_2))) {
-          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
-        } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
+        if (likely(PyList_CheckExact(__pyx_t_12))) {
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
+        } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
         } else {
-          __pyx_t_3 = PyIter_Next(__pyx_t_2);
-          if (!__pyx_t_3) {
+          __pyx_t_2 = PyIter_Next(__pyx_t_12);
+          if (!__pyx_t_2) {
             if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             break;
           }
-          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_GOTREF(__pyx_t_2);
         }
         __Pyx_DECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_3;
-        __pyx_t_3 = 0;
-        __pyx_t_3 = PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        if (unlikely(PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_v_allele = __pyx_t_2;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        if (unlikely(PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       __Pyx_INCREF(((PyObject *)__pyx_t_18));
       __Pyx_DECREF(__pyx_v_alt);
       __pyx_v_alt = ((PyObject *)__pyx_t_18);
       __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":780
+      /* "cvcf.pyx":780
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:             # <<<<<<<<<<<<<<
@@ -15778,82 +15576,82 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_18));
       if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-        __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+        __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
       } else {
-        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
       }
       for (;;) {
-        if (likely(PyList_CheckExact(__pyx_t_2))) {
-          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
-        } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
+        if (likely(PyList_CheckExact(__pyx_t_12))) {
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
+        } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
         } else {
-          __pyx_t_3 = PyIter_Next(__pyx_t_2);
-          if (!__pyx_t_3) {
+          __pyx_t_2 = PyIter_Next(__pyx_t_12);
+          if (!__pyx_t_2) {
             if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             break;
           }
-          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_GOTREF(__pyx_t_2);
         }
         __Pyx_DECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_3;
-        __pyx_t_3 = 0;
+        __pyx_v_allele = __pyx_t_2;
+        __pyx_t_2 = 0;
         __pyx_t_17 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        if (unlikely(PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        if (unlikely(PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
       __Pyx_INCREF(((PyObject *)__pyx_t_18));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_18));
+      PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_t_18));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_18));
       __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
-      __pyx_t_18 = PyObject_Call(__pyx_builtin_min, __pyx_t_2, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_18, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+      __pyx_t_12 = PyObject_RichCompare(__pyx_t_18, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (!__pyx_t_8) {
-        __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_6 = (__pyx_t_5 == 0);
-        __pyx_t_15 = __pyx_t_6;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      if (!__pyx_t_7) {
+        __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = (__pyx_t_4 == 0);
+        __pyx_t_15 = __pyx_t_5;
       } else {
-        __pyx_t_15 = __pyx_t_8;
+        __pyx_t_15 = __pyx_t_7;
       }
       if (__pyx_t_15) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":781
+        /* "cvcf.pyx":781
  *                 alt = [allele[:-1] for allele in alt]
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  *                     ref = faref_leftflank[pos-left-1] + ref             # <<<<<<<<<<<<<<
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
  *                     pos -= 1
  */
-        __pyx_t_2 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_18 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_18 = PyNumber_Subtract(__pyx_t_12, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_18); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __pyx_t_12 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_18); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __pyx_t_18 = PyNumber_Add(__pyx_t_2, __pyx_v_ref); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_18 = PyNumber_Add(__pyx_t_12, __pyx_v_ref); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         __Pyx_DECREF(__pyx_v_ref);
         __pyx_v_ref = __pyx_t_18;
         __pyx_t_18 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":782
+        /* "cvcf.pyx":782
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  *                     ref = faref_leftflank[pos-left-1] + ref
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]             # <<<<<<<<<<<<<<
@@ -15863,50 +15661,50 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
         __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_18));
         if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
-          __pyx_t_5 = 0; __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2);
+          __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_12);
         } else {
-          __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
         }
         for (;;) {
-          if (likely(PyList_CheckExact(__pyx_t_2))) {
-            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
-          } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
+          if (likely(PyList_CheckExact(__pyx_t_12))) {
+            if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
+          } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+            if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
           } else {
-            __pyx_t_3 = PyIter_Next(__pyx_t_2);
-            if (!__pyx_t_3) {
+            __pyx_t_2 = PyIter_Next(__pyx_t_12);
+            if (!__pyx_t_2) {
               if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
               break;
             }
-            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_GOTREF(__pyx_t_2);
           }
           __Pyx_DECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_3;
-          __pyx_t_3 = 0;
-          __pyx_t_3 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_9 = PyNumber_Subtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __pyx_t_3 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_9); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_9 = PyNumber_Add(__pyx_t_3, __pyx_v_allele); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          if (unlikely(PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_v_allele = __pyx_t_2;
+          __pyx_t_2 = 0;
+          __pyx_t_2 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_10 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_2 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_10); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_10 = PyNumber_Add(__pyx_t_2, __pyx_v_allele); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          if (unlikely(PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         }
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         __Pyx_INCREF(((PyObject *)__pyx_t_18));
         __Pyx_DECREF(__pyx_v_alt);
         __pyx_v_alt = ((PyObject *)__pyx_t_18);
         __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":783
+        /* "cvcf.pyx":783
  *                     ref = faref_leftflank[pos-left-1] + ref
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
  *                     pos -= 1             # <<<<<<<<<<<<<<
@@ -15918,16 +15716,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
         __Pyx_DECREF(__pyx_v_pos);
         __pyx_v_pos = __pyx_t_18;
         __pyx_t_18 = 0;
-        goto __pyx_L107;
+        goto __pyx_L111;
       }
-      __pyx_L107:;
+      __pyx_L111:;
     }
-    __pyx_L98_break:;
-    goto __pyx_L96;
+    __pyx_L102_break:;
+    goto __pyx_L100;
   }
-  __pyx_L96:;
+  __pyx_L100:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":786
+  /* "cvcf.pyx":786
  * 
  *         # parse sample columns
  *         samples = []             # <<<<<<<<<<<<<<
@@ -15940,31 +15738,31 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_v_samples = __pyx_t_18;
   __pyx_t_18 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":787
+  /* "cvcf.pyx":787
  *         # parse sample columns
  *         samples = []
  *         for sample in cols[9:]:             # <<<<<<<<<<<<<<
  *             dict = {}
  *             values = sample.split(':')
  */
-  __pyx_t_18 = PySequence_GetSlice(__pyx_v_cols, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_18 = __Pyx_PySequence_GetSlice(__pyx_v_cols, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_18);
   if (PyList_CheckExact(__pyx_t_18) || PyTuple_CheckExact(__pyx_t_18)) {
-    __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_18; __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_4 = 0; __pyx_t_12 = __pyx_t_18; __Pyx_INCREF(__pyx_t_12);
   } else {
-    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
   }
   __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_18 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++;
+    if (likely(PyList_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_18 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_18); __pyx_t_4++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_12))) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+      __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_18); __pyx_t_4++;
     } else {
-      __pyx_t_18 = PyIter_Next(__pyx_t_2);
+      __pyx_t_18 = PyIter_Next(__pyx_t_12);
       if (!__pyx_t_18) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
@@ -15975,7 +15773,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_v_sample = __pyx_t_18;
     __pyx_t_18 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":788
+    /* "cvcf.pyx":788
  *         samples = []
  *         for sample in cols[9:]:
  *             dict = {}             # <<<<<<<<<<<<<<
@@ -15988,7 +15786,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     __pyx_v_dict = __pyx_t_18;
     __pyx_t_18 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":789
+    /* "cvcf.pyx":789
  *         for sample in cols[9:]:
  *             dict = {}
  *             values = sample.split(':')             # <<<<<<<<<<<<<<
@@ -15997,20 +15795,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     __pyx_t_18 = PyObject_GetAttr(__pyx_v_sample, __pyx_n_s__split); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_18);
-    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_kp_s_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
-    __pyx_t_3 = PyObject_Call(__pyx_t_18, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_k_tuple_114), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
     __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_v_values);
-    __pyx_v_values = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_v_values = __pyx_t_10;
+    __pyx_t_10 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":790
+    /* "cvcf.pyx":790
  *             dict = {}
  *             values = sample.split(':')
  *             if len(values) > len(format):             # <<<<<<<<<<<<<<
@@ -16018,105 +15810,105 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *             for idx in range(len(format)):
  */
     __pyx_t_17 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_15 = (__pyx_t_17 > __pyx_t_4);
+    __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = (__pyx_t_17 > __pyx_t_3);
     if (__pyx_t_15) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":791
+      /* "cvcf.pyx":791
  *             values = sample.split(':')
  *             if len(values) > len(format):
  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))             # <<<<<<<<<<<<<<
  *             for idx in range(len(format)):
  *                 expected = self.get_expected(format[idx], self._format, alt)
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_18);
-      __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); 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_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_20);
-      PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18);
-      __Pyx_GIVEREF(__pyx_t_18);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_20));
+      PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_sample);
       PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_sample);
       __Pyx_GIVEREF(__pyx_v_sample);
-      PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_12);
-      __Pyx_GIVEREF(__pyx_t_12);
-      __pyx_t_18 = 0;
-      __pyx_t_12 = 0;
-      __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_t_20); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
-      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+      PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      __pyx_t_2 = 0;
+      __pyx_t_9 = 0;
+      __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+      __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
       __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_20);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_20));
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
-      PyTuple_SET_ITEM(__pyx_t_20, 2, ((PyObject *)__pyx_t_12));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
+      PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_18);
+      __Pyx_GIVEREF(__pyx_t_18);
+      PyTuple_SET_ITEM(__pyx_t_20, 2, ((PyObject *)__pyx_t_9));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
+      __pyx_t_18 = 0;
       __pyx_t_9 = 0;
-      __pyx_t_12 = 0;
-      __pyx_t_12 = PyObject_Call(__pyx_t_3, __pyx_t_20, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-      goto __pyx_L114;
+      __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      goto __pyx_L118;
     }
-    __pyx_L114:;
+    __pyx_L118:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":792
+    /* "cvcf.pyx":792
  *             if len(values) > len(format):
  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
  *             for idx in range(len(format)):             # <<<<<<<<<<<<<<
  *                 expected = self.get_expected(format[idx], self._format, alt)
  *                 if idx < len(values): value = values[idx]
  */
-    __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_4; __pyx_t_17+=1) {
+    __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_3; __pyx_t_17+=1) {
       __pyx_v_idx = __pyx_t_17;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":793
+      /* "cvcf.pyx":793
  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
  *             for idx in range(len(format)):
  *                 expected = self.get_expected(format[idx], self._format, alt)             # <<<<<<<<<<<<<<
  *                 if idx < len(values): value = values[idx]
  *                 else:
  */
-      __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_expected); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_expected); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_20);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_20);
+      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_18));
+      PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_20);
       __Pyx_GIVEREF(__pyx_t_20);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
-      __Pyx_GIVEREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
       __Pyx_INCREF(__pyx_v_alt);
-      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_alt);
+      PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_v_alt);
       __Pyx_GIVEREF(__pyx_v_alt);
       __pyx_t_20 = 0;
-      __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_12, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
       __Pyx_DECREF(__pyx_v_expected);
-      __pyx_v_expected = __pyx_t_3;
-      __pyx_t_3 = 0;
+      __pyx_v_expected = __pyx_t_10;
+      __pyx_t_10 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":794
+      /* "cvcf.pyx":794
  *             for idx in range(len(format)):
  *                 expected = self.get_expected(format[idx], self._format, alt)
  *                 if idx < len(values): value = values[idx]             # <<<<<<<<<<<<<<
@@ -16126,287 +15918,287 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
       __pyx_t_21 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_15 = (__pyx_v_idx < __pyx_t_21);
       if (__pyx_t_15) {
-        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_v_value);
-        __pyx_v_value = __pyx_t_3;
-        __pyx_t_3 = 0;
-        goto __pyx_L117;
+        __pyx_v_value = __pyx_t_10;
+        __pyx_t_10 = 0;
+        goto __pyx_L121;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":796
+        /* "cvcf.pyx":796
  *                 if idx < len(values): value = values[idx]
  *                 else:
  *                     if expected == -1: value = "."             # <<<<<<<<<<<<<<
  *                     else: value = ",".join(["."]*expected)
  *                 dict[format[idx]] = self.parse_formatdata(format[idx], value, self._format, line)
  */
-        __pyx_t_3 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_10 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         if (__pyx_t_15) {
-          __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+          __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
           __Pyx_DECREF(__pyx_v_value);
-          __pyx_v_value = ((PyObject *)__pyx_kp_s_6);
-          goto __pyx_L118;
+          __pyx_v_value = ((PyObject *)__pyx_kp_s_9);
+          goto __pyx_L122;
         }
         /*else*/ {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":797
+          /* "cvcf.pyx":797
  *                 else:
  *                     if expected == -1: value = "."
  *                     else: value = ",".join(["."]*expected)             # <<<<<<<<<<<<<<
  *                 dict[format[idx]] = self.parse_formatdata(format[idx], value, self._format, line)
  *                 if expected != -1 and len(dict[format[idx]]) != expected:
  */
-          __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-          __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
-          PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_kp_s_6));
-          __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
-          __pyx_t_12 = PyNumber_Multiply(((PyObject *)__pyx_t_9), __pyx_v_expected); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_12);
-          __Pyx_DECREF(((PyObject *)__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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(((PyObject *)__pyx_t_18));
+          __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+          PyList_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_kp_s_9));
+          __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+          __pyx_t_9 = PyNumber_Multiply(((PyObject *)__pyx_t_18), __pyx_v_expected); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_9);
-          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
-          __Pyx_GIVEREF(__pyx_t_12);
-          __pyx_t_12 = 0;
-          __pyx_t_12 = PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_12);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+          __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(((PyObject *)__pyx_t_18));
+          PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_9);
+          __Pyx_GIVEREF(__pyx_t_9);
+          __pyx_t_9 = 0;
+          __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
           __Pyx_DECREF(__pyx_v_value);
-          __pyx_v_value = __pyx_t_12;
-          __pyx_t_12 = 0;
+          __pyx_v_value = __pyx_t_9;
+          __pyx_t_9 = 0;
         }
-        __pyx_L118:;
+        __pyx_L122:;
       }
-      __pyx_L117:;
+      __pyx_L121:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":798
+      /* "cvcf.pyx":798
  *                     if expected == -1: value = "."
  *                     else: value = ",".join(["."]*expected)
  *                 dict[format[idx]] = self.parse_formatdata(format[idx], value, self._format, line)             # <<<<<<<<<<<<<<
  *                 if expected != -1 and len(dict[format[idx]]) != expected:
  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
  */
-      __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_18);
+      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
       __pyx_t_20 = PyTuple_New(4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_20);
-      PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_20));
+      PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18);
+      __Pyx_GIVEREF(__pyx_t_18);
       __Pyx_INCREF(__pyx_v_value);
       PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_value);
       __Pyx_GIVEREF(__pyx_v_value);
-      PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_3);
-      __Pyx_GIVEREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      __pyx_t_9 = 0;
-      __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_12, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+      __pyx_t_18 = 0;
+      __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
       __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_20);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_20, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_20, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":799
+      /* "cvcf.pyx":799
  *                     else: value = ",".join(["."]*expected)
  *                 dict[format[idx]] = self.parse_formatdata(format[idx], value, self._format, line)
  *                 if expected != -1 and len(dict[format[idx]]) != expected:             # <<<<<<<<<<<<<<
  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
  */
-      __pyx_t_3 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_10 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       if (__pyx_t_15) {
-        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_20 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_3); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_20 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_10); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_20);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __pyx_t_21 = PyObject_Length(__pyx_t_20); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
         __pyx_t_20 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_20);
-        __pyx_t_3 = PyObject_RichCompare(__pyx_t_20, __pyx_v_expected, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_10 = PyObject_RichCompare(__pyx_t_20, __pyx_v_expected, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_6 = __pyx_t_8;
+        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_5 = __pyx_t_7;
       } else {
-        __pyx_t_6 = __pyx_t_15;
+        __pyx_t_5 = __pyx_t_15;
       }
-      if (__pyx_t_6) {
+      if (__pyx_t_5) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":800
+        /* "cvcf.pyx":800
  *                 dict[format[idx]] = self.parse_formatdata(format[idx], value, self._format, line)
  *                 if expected != -1 and len(dict[format[idx]]) != expected:
  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,             # <<<<<<<<<<<<<<
  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
  */
-        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_20 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_11); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_20 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_20);
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":801
+        /* "cvcf.pyx":801
  *                 if expected != -1 and len(dict[format[idx]]) != expected:
  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))             # <<<<<<<<<<<<<<
  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
  *                     dict[format[idx]] = dict[format[idx]][:expected]
  */
-        __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_12);
         __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_18 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_9); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
-        __Pyx_GIVEREF(__pyx_t_12);
+        __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_18); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+        __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_18));
+        PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
         __Pyx_INCREF(__pyx_v_expected);
-        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_expected);
+        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_v_expected);
         __Pyx_GIVEREF(__pyx_v_expected);
-        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_18);
-        __Pyx_GIVEREF(__pyx_t_18);
-        __pyx_t_12 = 0;
-        __pyx_t_18 = 0;
-        __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_t_9); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_9 = 0;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+        __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_18));
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_20);
+        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_20);
         __Pyx_GIVEREF(__pyx_t_20);
-        PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_t_18));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_18));
+        PyTuple_SET_ITEM(__pyx_t_18, 2, ((PyObject *)__pyx_t_2));
+        __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
         __pyx_t_20 = 0;
-        __pyx_t_18 = 0;
-        __pyx_t_18 = PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":802
+        /* "cvcf.pyx":802
  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))             # <<<<<<<<<<<<<<
  *                     dict[format[idx]] = dict[format[idx]][:expected]
  *             samples.append( dict )
  */
-        __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_18 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_2); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_18); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_21 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        __pyx_t_21 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_18 = PyObject_RichCompare(__pyx_t_9, __pyx_v_expected, Py_LT); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyObject_RichCompare(__pyx_t_18, __pyx_v_expected, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        if (__pyx_t_6) {
-          __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_18);
-          __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_18); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-          __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_9, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        if (__pyx_t_5) {
+          __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_18 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_2); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_18);
+          __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __pyx_t_20 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_10); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_20);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_20, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+          __pyx_t_20 = PyList_New(1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(((PyObject *)__pyx_t_20));
+          PyList_SET_ITEM(__pyx_t_20, 0, __pyx_t_10);
+          __Pyx_GIVEREF(__pyx_t_10);
+          __pyx_t_10 = 0;
+          __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_10); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_21 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-          PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_18);
-          __Pyx_GIVEREF(__pyx_t_18);
-          __pyx_t_18 = 0;
-          __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_18);
-          __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_18); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-          __pyx_t_21 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_18 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_18);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_t_9), __pyx_t_18); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-          __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_18);
-          __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_18); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_9);
-          __pyx_t_20 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_20);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_t_10 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_18, __pyx_t_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+          __pyx_t_9 = PyNumber_Multiply(((PyObject *)__pyx_t_20), __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_18, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
           __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-          goto __pyx_L120;
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_2, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          goto __pyx_L124;
         }
-        __pyx_L120:;
+        __pyx_L124:;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":803
+        /* "cvcf.pyx":803
  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
  *                     dict[format[idx]] = dict[format[idx]][:expected]             # <<<<<<<<<<<<<<
  *             samples.append( dict )
  * 
  */
-        __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_18);
-        __pyx_t_20 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_18); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_20);
-        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__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_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_2); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __pyx_t_21 = __Pyx_PyIndex_AsSsize_t(__pyx_v_expected); if (unlikely((__pyx_t_21 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_18 = PySequence_GetSlice(__pyx_t_20, 0, __pyx_t_21); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_18);
-        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-        __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_20);
-        if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_20, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-        goto __pyx_L119;
+        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_t_10, 0, __pyx_t_21); 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_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_10, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L123;
       }
-      __pyx_L119:;
+      __pyx_L123:;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":804
+    /* "cvcf.pyx":804
  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
  *                     dict[format[idx]] = dict[format[idx]][:expected]
  *             samples.append( dict )             # <<<<<<<<<<<<<<
@@ -16416,171 +16208,171 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
     if (unlikely(__pyx_v_samples == Py_None)) {
       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
-    __pyx_t_16 = PyList_Append(((PyObject *)__pyx_v_samples), ((PyObject *)__pyx_v_dict)); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_16 = PyList_Append(__pyx_v_samples, ((PyObject *)__pyx_v_dict)); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":807
+  /* "cvcf.pyx":807
  * 
  *         # done
  *         d = {'chrom':chrom,             # <<<<<<<<<<<<<<
  *              'pos':pos,      # return 0-based position
  *              'id':id,
  */
-  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__chrom), __pyx_v_chrom) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__chrom), __pyx_v_chrom) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":808
+  /* "cvcf.pyx":808
  *         # done
  *         d = {'chrom':chrom,
  *              'pos':pos,      # return 0-based position             # <<<<<<<<<<<<<<
  *              'id':id,
  *              'ref':ref,
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__pos), __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__pos), __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":809
+  /* "cvcf.pyx":809
  *         d = {'chrom':chrom,
  *              'pos':pos,      # return 0-based position
  *              'id':id,             # <<<<<<<<<<<<<<
  *              'ref':ref,
  *              'alt':alt,
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__id), __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__id), __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":810
+  /* "cvcf.pyx":810
  *              'pos':pos,      # return 0-based position
  *              'id':id,
  *              'ref':ref,             # <<<<<<<<<<<<<<
  *              'alt':alt,
  *              'qual':qual,
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":811
+  /* "cvcf.pyx":811
  *              'id':id,
  *              'ref':ref,
  *              'alt':alt,             # <<<<<<<<<<<<<<
  *              'qual':qual,
  *              'filter':filter,
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__alt), __pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__alt), __pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":812
+  /* "cvcf.pyx":812
  *              'ref':ref,
  *              'alt':alt,
  *              'qual':qual,             # <<<<<<<<<<<<<<
  *              'filter':filter,
  *              'info':info,
  */
-  __pyx_t_18 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_18);
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__qual), __pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__qual), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":813
+  /* "cvcf.pyx":813
  *              'alt':alt,
  *              'qual':qual,
  *              'filter':filter,             # <<<<<<<<<<<<<<
  *              'info':info,
  *              'format':format}
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__filter), __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__filter), __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":814
+  /* "cvcf.pyx":814
  *              'qual':qual,
  *              'filter':filter,
  *              'info':info,             # <<<<<<<<<<<<<<
  *              'format':format}
  *         for key,value in zip(self._samples,samples):
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_v_info)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_v_info)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":815
+  /* "cvcf.pyx":815
  *              'filter':filter,
  *              'info':info,
  *              'format':format}             # <<<<<<<<<<<<<<
  *         for key,value in zip(self._samples,samples):
  *             d[key] = value
  */
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__format), __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__format), __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_v_d));
-  __pyx_v_d = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __pyx_v_d = __pyx_t_12;
+  __pyx_t_12 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":816
+  /* "cvcf.pyx":816
  *              'info':info,
  *              'format':format}
  *         for key,value in zip(self._samples,samples):             # <<<<<<<<<<<<<<
  *             d[key] = value
  * 
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_18);
-  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12);
+  __Pyx_GIVEREF(__pyx_t_12);
   __Pyx_INCREF(((PyObject *)__pyx_v_samples));
-  PyTuple_SET_ITEM(__pyx_t_18, 1, ((PyObject *)__pyx_v_samples));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samples));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_samples));
-  __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_zip, __pyx_t_18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-    __pyx_t_5 = 0; __pyx_t_18 = __pyx_t_2; __Pyx_INCREF(__pyx_t_18);
+  __pyx_t_12 = 0;
+  __pyx_t_12 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) {
+    __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_12; __Pyx_INCREF(__pyx_t_2);
   } else {
-    __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_18);
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_18))) {
-      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break;
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_18))) {
-      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
+    if (likely(PyList_CheckExact(__pyx_t_2))) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++;
     } else {
-      __pyx_t_2 = PyIter_Next(__pyx_t_18);
-      if (!__pyx_t_2) {
+      __pyx_t_12 = PyIter_Next(__pyx_t_2);
+      if (!__pyx_t_12) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_12);
     }
-    if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
-      PyObject* tuple = __pyx_t_2;
-      __pyx_t_20 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_20);
+    if (PyTuple_CheckExact(__pyx_t_12) && likely(PyTuple_GET_SIZE(__pyx_t_12) == 2)) {
+      PyObject* tuple = __pyx_t_12;
+      __pyx_t_10 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_10);
       __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       __Pyx_DECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_t_20;
-      __pyx_t_20 = 0;
+      __pyx_v_key = __pyx_t_10;
+      __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_v_value);
       __pyx_v_value = __pyx_t_9;
       __pyx_t_9 = 0;
     } else {
-      __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_20 = __Pyx_UnpackItem(__pyx_t_3, 0); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_20);
-      __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_3, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_18);
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_10 = __Pyx_UnpackItem(__pyx_t_18, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_18, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      if (__Pyx_EndUnpack(__pyx_t_3, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__Pyx_EndUnpack(__pyx_t_18, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
       __Pyx_DECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_t_20;
-      __pyx_t_20 = 0;
+      __pyx_v_key = __pyx_t_10;
+      __pyx_t_10 = 0;
       __Pyx_DECREF(__pyx_v_value);
       __pyx_v_value = __pyx_t_9;
       __pyx_t_9 = 0;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":817
+    /* "cvcf.pyx":817
  *              'format':format}
  *         for key,value in zip(self._samples,samples):
  *             d[key] = value             # <<<<<<<<<<<<<<
@@ -16589,9 +16381,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  */
     if (PyDict_SetItem(((PyObject *)__pyx_v_d), __pyx_v_key, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":819
+  /* "cvcf.pyx":819
  *             d[key] = value
  * 
  *         return d             # <<<<<<<<<<<<<<
@@ -16608,7 +16400,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_9);
   __Pyx_XDECREF(__pyx_t_10);
   __Pyx_XDECREF(__pyx_t_11);
@@ -16655,13 +16447,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
   __Pyx_DECREF(__pyx_v_value);
   __Pyx_DECREF(__pyx_v_d);
   __Pyx_DECREF(__pyx_v_key);
-  __Pyx_DECREF(__pyx_8genexpr0__pyx_v_allele);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":822
+/* "cvcf.pyx":822
  * 
  * 
  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
@@ -16669,9 +16460,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse_data(PyObject *__pyx_self, PyObject *
  *         for k in required:
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_write_data = {__Pyx_NAMESTR("write_data"), (PyCFunction)__pyx_pf_4cvcf_3VCF_write_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_17write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_17write_data = {__Pyx_NAMESTR("write_data"), (PyCFunction)__pyx_pf_4cvcf_3VCF_17write_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_17write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_data = 0;
@@ -16752,10 +16543,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_v_alt = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_filter = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_qual = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_output = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_output = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_s = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":823
+  /* "cvcf.pyx":823
  * 
  *     def write_data(self, stream, data):
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples             # <<<<<<<<<<<<<<
@@ -16801,7 +16592,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_v_required = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":824
+  /* "cvcf.pyx":824
  *     def write_data(self, stream, data):
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
  *         for k in required:             # <<<<<<<<<<<<<<
@@ -16833,7 +16624,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __pyx_v_k = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":825
+    /* "cvcf.pyx":825
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
  *         for k in required:
  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))             # <<<<<<<<<<<<<<
@@ -16843,24 +16634,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __pyx_t_5 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_data, __pyx_v_k))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_5) {
       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
       __Pyx_INCREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
-      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __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_Remainder(((PyObject *)__pyx_kp_s_68), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__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 = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_Raise(__pyx_t_2, 0, 0);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -16870,7 +16661,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":826
+  /* "cvcf.pyx":826
  *         for k in required:
  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))
  *         if data['alt'] == []: alt = "."             # <<<<<<<<<<<<<<
@@ -16888,14 +16679,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_5) {
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
     __Pyx_DECREF(__pyx_v_alt);
-    __pyx_v_alt = ((PyObject *)__pyx_kp_s_6);
+    __pyx_v_alt = ((PyObject *)__pyx_kp_s_9);
     goto __pyx_L9;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":827
+    /* "cvcf.pyx":827
  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))
  *         if data['alt'] == []: alt = "."
  *         else: alt = ",".join(data['alt'])             # <<<<<<<<<<<<<<
@@ -16907,21 +16698,21 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__alt)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __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 = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_alt);
     __pyx_v_alt = __pyx_t_2;
     __pyx_t_2 = 0;
   }
   __pyx_L9:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":828
+  /* "cvcf.pyx":828
  *         if data['alt'] == []: alt = "."
  *         else: alt = ",".join(data['alt'])
  *         if data['filter'] == None: filter = "."             # <<<<<<<<<<<<<<
@@ -16936,13 +16727,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_5) {
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
     __Pyx_DECREF(__pyx_v_filter);
-    __pyx_v_filter = ((PyObject *)__pyx_kp_s_6);
+    __pyx_v_filter = ((PyObject *)__pyx_kp_s_9);
     goto __pyx_L10;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":829
+  /* "cvcf.pyx":829
  *         else: alt = ",".join(data['alt'])
  *         if data['filter'] == None: filter = "."
  *         elif data['filter'] == []:             # <<<<<<<<<<<<<<
@@ -16961,7 +16752,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_5) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":830
+    /* "cvcf.pyx":830
  *         if data['filter'] == None: filter = "."
  *         elif data['filter'] == []:
  *             if self._version == 33: filter = "0"             # <<<<<<<<<<<<<<
@@ -16983,7 +16774,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":831
+      /* "cvcf.pyx":831
  *         elif data['filter'] == []:
  *             if self._version == 33: filter = "0"
  *             else: filter = "PASS"             # <<<<<<<<<<<<<<
@@ -16999,33 +16790,33 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":832
+    /* "cvcf.pyx":832
  *             if self._version == 33: filter = "0"
  *             else: filter = "PASS"
  *         else: filter = ';'.join(data['filter'])             # <<<<<<<<<<<<<<
  *         if data['qual'] == -1: qual = "."
  *         else: qual = str(data['qual'])
  */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_11), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_v_filter);
     __pyx_v_filter = __pyx_t_1;
     __pyx_t_1 = 0;
   }
   __pyx_L10:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":833
+  /* "cvcf.pyx":833
  *             else: filter = "PASS"
  *         else: filter = ';'.join(data['filter'])
  *         if data['qual'] == -1: qual = "."             # <<<<<<<<<<<<<<
@@ -17040,14 +16831,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_5) {
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
     __Pyx_DECREF(__pyx_v_qual);
-    __pyx_v_qual = ((PyObject *)__pyx_kp_s_6);
+    __pyx_v_qual = ((PyObject *)__pyx_kp_s_9);
     goto __pyx_L12;
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":834
+    /* "cvcf.pyx":834
  *         else: filter = ';'.join(data['filter'])
  *         if data['qual'] == -1: qual = "."
  *         else: qual = str(data['qual'])             # <<<<<<<<<<<<<<
@@ -17057,20 +16848,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__qual)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
     __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_v_qual);
     __pyx_v_qual = __pyx_t_3;
     __pyx_t_3 = 0;
   }
   __pyx_L12:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":836
+  /* "cvcf.pyx":836
  *         else: qual = str(data['qual'])
  * 
  *         output = [data['chrom'],             # <<<<<<<<<<<<<<
@@ -17080,7 +16871,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__chrom)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":837
+  /* "cvcf.pyx":837
  * 
  *         output = [data['chrom'],
  *                   str(data['pos']+1),   # change to 1-based position             # <<<<<<<<<<<<<<
@@ -17093,15 +16884,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __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 = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":838
+  /* "cvcf.pyx":838
  *         output = [data['chrom'],
  *                   str(data['pos']+1),   # change to 1-based position
  *                   data['id'],             # <<<<<<<<<<<<<<
@@ -17111,7 +16902,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":839
+  /* "cvcf.pyx":839
  *                   str(data['pos']+1),   # change to 1-based position
  *                   data['id'],
  *                   data['ref'],             # <<<<<<<<<<<<<<
@@ -17121,7 +16912,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_6 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__ref)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":843
+  /* "cvcf.pyx":843
  *                   qual,
  *                   filter,
  *                   self.format_formatdata( data['info'], self._info, separator=";" ),             # <<<<<<<<<<<<<<
@@ -17135,7 +16926,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
   __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
   __Pyx_GIVEREF(__pyx_t_8);
   PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
@@ -17144,14 +16935,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_9 = 0;
   __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__separator), ((PyObject *)__pyx_kp_s_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, __pyx_t_10, ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__separator), ((PyObject *)__pyx_kp_s_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":844
+  /* "cvcf.pyx":844
  *                   filter,
  *                   self.format_formatdata( data['info'], self._info, separator=";" ),
  *                   self.format_formatdata( data['format'], self._format, value=False ) ]             # <<<<<<<<<<<<<<
@@ -17165,7 +16956,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
   __Pyx_GIVEREF(__pyx_t_10);
   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_7);
@@ -17178,10 +16969,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __Pyx_GOTREF(__pyx_t_10);
   if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__value), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_10 = PyEval_CallObjectWithKeywords(__pyx_t_9, __pyx_t_11, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = PyEval_CallObjectWithKeywords(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
   __pyx_t_7 = PyList_New(9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_7));
@@ -17216,7 +17007,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   __pyx_v_output = __pyx_t_7;
   __pyx_t_7 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":846
+  /* "cvcf.pyx":846
  *                   self.format_formatdata( data['format'], self._format, value=False ) ]
  * 
  *         for s in self._samples:             # <<<<<<<<<<<<<<
@@ -17251,7 +17042,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __pyx_v_s = __pyx_t_7;
     __pyx_t_7 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":847
+    /* "cvcf.pyx":847
  * 
  *         for s in self._samples:
  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )             # <<<<<<<<<<<<<<
@@ -17268,7 +17059,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
     __Pyx_GIVEREF(__pyx_t_8);
     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
@@ -17281,17 +17072,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
     __Pyx_GOTREF(__pyx_t_8);
     if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__key), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    __pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_output), __pyx_t_8); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_12 = PyList_Append(__pyx_v_output, __pyx_t_8); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   }
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":849
+  /* "cvcf.pyx":849
  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )
  * 
  *         stream.write( "\t".join(output) + "\n" )             # <<<<<<<<<<<<<<
@@ -17300,29 +17091,29 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
  */
   __pyx_t_10 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_51), __pyx_n_s__join); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_85), __pyx_n_s__join); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
   __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
   __Pyx_INCREF(((PyObject *)__pyx_v_output));
   PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_output));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
-  __pyx_t_1 = PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __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_6); __pyx_t_6 = 0;
-  __pyx_t_6 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  __pyx_t_6 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_91)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
   __Pyx_GIVEREF(__pyx_t_6);
   __pyx_t_6 = 0;
-  __pyx_t_6 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __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_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -17352,7 +17143,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":851
+/* "cvcf.pyx":851
  *         stream.write( "\t".join(output) + "\n" )
  * 
  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
@@ -17360,9 +17151,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write_data(PyObject *__pyx_self, PyObject *
  *         for line in stream:
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF__parse_header = {__Pyx_NAMESTR("_parse_header"), (PyCFunction)__pyx_pf_4cvcf_3VCF__parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_18_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_18_parse_header = {__Pyx_NAMESTR("_parse_header"), (PyCFunction)__pyx_pf_4cvcf_3VCF_18_parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_18_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_line;
@@ -17371,8 +17162,8 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_t_6;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
   __Pyx_RefNannySetupContext("_parse_header");
   __pyx_self = __pyx_self;
@@ -17418,7 +17209,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_line = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":852
+  /* "cvcf.pyx":852
  * 
  *     def _parse_header(self, stream):
  *         self._lineno = 0             # <<<<<<<<<<<<<<
@@ -17427,7 +17218,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
  */
   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":853
+  /* "cvcf.pyx":853
  *     def _parse_header(self, stream):
  *         self._lineno = 0
  *         for line in stream:             # <<<<<<<<<<<<<<
@@ -17459,7 +17250,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
     __pyx_v_line = __pyx_t_3;
     __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":854
+    /* "cvcf.pyx":854
  *         self._lineno = 0
  *         for line in stream:
  *             self._lineno += 1             # <<<<<<<<<<<<<<
@@ -17474,7 +17265,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":855
+    /* "cvcf.pyx":855
  *         for line in stream:
  *             self._lineno += 1
  *             if line.startswith('##'):             # <<<<<<<<<<<<<<
@@ -17483,111 +17274,99 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
  */
     __pyx_t_4 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_116), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_43));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
-    __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":856
+      /* "cvcf.pyx":856
  *             self._lineno += 1
  *             if line.startswith('##'):
  *                 self.parse_header( line.strip() )             # <<<<<<<<<<<<<<
  *             elif line.startswith('#'):
  *                 self.parse_heading( line.strip() )
  */
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __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 = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
-      __Pyx_GIVEREF(__pyx_t_4);
-      __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      __pyx_t_6 = 0;
+      __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       goto __pyx_L8;
     }
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":857
+    /* "cvcf.pyx":857
  *             if line.startswith('##'):
  *                 self.parse_header( line.strip() )
  *             elif line.startswith('#'):             # <<<<<<<<<<<<<<
  *                 self.parse_heading( line.strip() )
  *                 self.enter_default_format()
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_117), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_50));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_50));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_50));
-    __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_6) {
+    if (__pyx_t_5) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":858
+      /* "cvcf.pyx":858
  *                 self.parse_header( line.strip() )
  *             elif line.startswith('#'):
  *                 self.parse_heading( line.strip() )             # <<<<<<<<<<<<<<
  *                 self.enter_default_format()
  *             else:
  */
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_heading); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_heading); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __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 = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_3 = 0;
+      __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
-      __Pyx_GIVEREF(__pyx_t_4);
-      __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":859
+      /* "cvcf.pyx":859
  *             elif line.startswith('#'):
  *                 self.parse_heading( line.strip() )
  *                 self.enter_default_format()             # <<<<<<<<<<<<<<
  *             else:
  *                 break
  */
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_69); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_118); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __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_6); __pyx_t_6 = 0;
       goto __pyx_L8;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":861
+      /* "cvcf.pyx":861
  *                 self.enter_default_format()
  *             else:
  *                 break             # <<<<<<<<<<<<<<
@@ -17601,7 +17380,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
   __pyx_L7_break:;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":862
+  /* "cvcf.pyx":862
  *             else:
  *                 break
  *         return line             # <<<<<<<<<<<<<<
@@ -17619,7 +17398,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
   __Pyx_AddTraceback("cvcf.VCF._parse_header");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -17629,7 +17408,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":864
+/* "cvcf.pyx":864
  *         return line
  * 
  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
@@ -17637,9 +17416,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse_header(PyObject *__pyx_self, PyObjec
  *             d = self.parse_data( line.strip() )
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF__parse = {__Pyx_NAMESTR("_parse"), (PyCFunction)__pyx_pf_4cvcf_3VCF__parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_19_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_19_parse = {__Pyx_NAMESTR("_parse"), (PyCFunction)__pyx_pf_4cvcf_3VCF_19_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_19_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_stream = 0;
@@ -17708,7 +17487,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
   __Pyx_INCREF(__pyx_v_line);
   __pyx_v_d = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":865
+  /* "cvcf.pyx":865
  * 
  *     def _parse(self, line, stream):
  *         if len(line.strip()) > 0:             # <<<<<<<<<<<<<<
@@ -17725,7 +17504,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
   __pyx_t_4 = (__pyx_t_3 > 0);
   if (__pyx_t_4) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":866
+    /* "cvcf.pyx":866
  *     def _parse(self, line, stream):
  *         if len(line.strip()) > 0:
  *             d = self.parse_data( line.strip() )             # <<<<<<<<<<<<<<
@@ -17740,14 +17519,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
     __Pyx_GOTREF(__pyx_t_5);
     __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 = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
     __Pyx_GIVEREF(__pyx_t_5);
     __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_v_d);
     __pyx_v_d = __pyx_t_5;
     __pyx_t_5 = 0;
@@ -17755,7 +17534,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":868
+  /* "cvcf.pyx":868
  *             d = self.parse_data( line.strip() )
  *             #if d: yield d
  *         for line in stream:             # <<<<<<<<<<<<<<
@@ -17787,7 +17566,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
     __pyx_v_line = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":869
+    /* "cvcf.pyx":869
  *             #if d: yield d
  *         for line in stream:
  *             self._lineno += 1             # <<<<<<<<<<<<<<
@@ -17802,7 +17581,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":870
+    /* "cvcf.pyx":870
  *         for line in stream:
  *             self._lineno += 1
  *             if self._lines and self._lineno > self._lines: raise StopIteration             # <<<<<<<<<<<<<<
@@ -17835,7 +17614,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
     }
     __pyx_L9:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":871
+    /* "cvcf.pyx":871
  *             self._lineno += 1
  *             if self._lines and self._lineno > self._lines: raise StopIteration
  *             d = self.parse_data( line.strip() )             # <<<<<<<<<<<<<<
@@ -17850,14 +17629,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
     __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 = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_v_d);
     __pyx_v_d = __pyx_t_2;
     __pyx_t_2 = 0;
@@ -17881,7 +17660,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":880
+/* "cvcf.pyx":880
  *     ######################################################################################################
  * 
  *     def getsamples(self):             # <<<<<<<<<<<<<<
@@ -17889,16 +17668,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF__parse(PyObject *__pyx_self, PyObject *__py
  *         return self._samples
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_getsamples[] = " List of samples in VCF file ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_getsamples = {__Pyx_NAMESTR("getsamples"), (PyCFunction)__pyx_pf_4cvcf_3VCF_getsamples, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_getsamples)};
-static PyObject *__pyx_pf_4cvcf_3VCF_getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_4cvcf_3VCF_20getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_20getsamples[] = " List of samples in VCF file ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_20getsamples = {__Pyx_NAMESTR("getsamples"), (PyCFunction)__pyx_pf_4cvcf_3VCF_20getsamples, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_20getsamples)};
+static PyObject *__pyx_pf_4cvcf_3VCF_20getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("getsamples");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":882
+  /* "cvcf.pyx":882
  *     def getsamples(self):
  *         """ List of samples in VCF file """
  *         return self._samples             # <<<<<<<<<<<<<<
@@ -17924,7 +17703,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getsamples(PyObject *__pyx_self, PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":884
+/* "cvcf.pyx":884
  *         return self._samples
  * 
  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
@@ -17932,10 +17711,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getsamples(PyObject *__pyx_self, PyObject *
  *         self._samples = samples
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_setsamples[] = " List of samples in VCF file ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setsamples = {__Pyx_NAMESTR("setsamples"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setsamples, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_setsamples)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_21setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_21setsamples[] = " List of samples in VCF file ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_21setsamples = {__Pyx_NAMESTR("setsamples"), (PyCFunction)__pyx_pf_4cvcf_3VCF_21setsamples, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_21setsamples)};
+static PyObject *__pyx_pf_4cvcf_3VCF_21setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_samples = 0;
   PyObject *__pyx_r = NULL;
@@ -17983,7 +17762,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setsamples(PyObject *__pyx_self, PyObject *
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":886
+  /* "cvcf.pyx":886
  *     def setsamples(self,samples):
  *         """ List of samples in VCF file """
  *         self._samples = samples             # <<<<<<<<<<<<<<
@@ -18003,7 +17782,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setsamples(PyObject *__pyx_self, PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":888
+/* "cvcf.pyx":888
  *         self._samples = samples
  * 
  *     def getheader(self):             # <<<<<<<<<<<<<<
@@ -18011,16 +17790,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setsamples(PyObject *__pyx_self, PyObject *
  *         return self._header
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_getheader(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_getheader[] = " List of header key-value pairs (strings) ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_getheader = {__Pyx_NAMESTR("getheader"), (PyCFunction)__pyx_pf_4cvcf_3VCF_getheader, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_getheader)};
-static PyObject *__pyx_pf_4cvcf_3VCF_getheader(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_4cvcf_3VCF_22getheader(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_22getheader[] = " List of header key-value pairs (strings) ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_22getheader = {__Pyx_NAMESTR("getheader"), (PyCFunction)__pyx_pf_4cvcf_3VCF_22getheader, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_22getheader)};
+static PyObject *__pyx_pf_4cvcf_3VCF_22getheader(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("getheader");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":890
+  /* "cvcf.pyx":890
  *     def getheader(self):
  *         """ List of header key-value pairs (strings) """
  *         return self._header             # <<<<<<<<<<<<<<
@@ -18046,7 +17825,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getheader(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":892
+/* "cvcf.pyx":892
  *         return self._header
  * 
  *     def setheader(self,header):             # <<<<<<<<<<<<<<
@@ -18054,10 +17833,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getheader(PyObject *__pyx_self, PyObject *_
  *         self._header = header
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_setheader[] = " List of header key-value pairs (strings) ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setheader = {__Pyx_NAMESTR("setheader"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setheader, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_setheader)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_23setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_23setheader[] = " List of header key-value pairs (strings) ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_23setheader = {__Pyx_NAMESTR("setheader"), (PyCFunction)__pyx_pf_4cvcf_3VCF_23setheader, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_23setheader)};
+static PyObject *__pyx_pf_4cvcf_3VCF_23setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_header = 0;
   PyObject *__pyx_r = NULL;
@@ -18105,7 +17884,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setheader(PyObject *__pyx_self, PyObject *_
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":894
+  /* "cvcf.pyx":894
  *     def setheader(self,header):
  *         """ List of header key-value pairs (strings) """
  *         self._header = header             # <<<<<<<<<<<<<<
@@ -18125,7 +17904,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setheader(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":896
+/* "cvcf.pyx":896
  *         self._header = header
  * 
  *     def getinfo(self):             # <<<<<<<<<<<<<<
@@ -18133,16 +17912,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setheader(PyObject *__pyx_self, PyObject *_
  *         return self._info
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_getinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_getinfo = {__Pyx_NAMESTR("getinfo"), (PyCFunction)__pyx_pf_4cvcf_3VCF_getinfo, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_getinfo)};
-static PyObject *__pyx_pf_4cvcf_3VCF_getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_4cvcf_3VCF_24getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_24getinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_24getinfo = {__Pyx_NAMESTR("getinfo"), (PyCFunction)__pyx_pf_4cvcf_3VCF_24getinfo, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_24getinfo)};
+static PyObject *__pyx_pf_4cvcf_3VCF_24getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("getinfo");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":898
+  /* "cvcf.pyx":898
  *     def getinfo(self):
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         return self._info             # <<<<<<<<<<<<<<
@@ -18168,7 +17947,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getinfo(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":900
+/* "cvcf.pyx":900
  *         return self._info
  * 
  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
@@ -18176,10 +17955,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getinfo(PyObject *__pyx_self, PyObject *__p
  *         self._info = info
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_setinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setinfo = {__Pyx_NAMESTR("setinfo"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setinfo, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_setinfo)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_25setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_25setinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_25setinfo = {__Pyx_NAMESTR("setinfo"), (PyCFunction)__pyx_pf_4cvcf_3VCF_25setinfo, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_25setinfo)};
+static PyObject *__pyx_pf_4cvcf_3VCF_25setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_info = 0;
   PyObject *__pyx_r = NULL;
@@ -18227,7 +18006,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setinfo(PyObject *__pyx_self, PyObject *__p
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":902
+  /* "cvcf.pyx":902
  *     def setinfo(self,info):
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         self._info = info             # <<<<<<<<<<<<<<
@@ -18247,7 +18026,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setinfo(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":904
+/* "cvcf.pyx":904
  *         self._info = info
  * 
  *     def getformat(self):             # <<<<<<<<<<<<<<
@@ -18255,16 +18034,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setinfo(PyObject *__pyx_self, PyObject *__p
  *         return self._format
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_getformat(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_getformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_getformat = {__Pyx_NAMESTR("getformat"), (PyCFunction)__pyx_pf_4cvcf_3VCF_getformat, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_getformat)};
-static PyObject *__pyx_pf_4cvcf_3VCF_getformat(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_4cvcf_3VCF_26getformat(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_26getformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_26getformat = {__Pyx_NAMESTR("getformat"), (PyCFunction)__pyx_pf_4cvcf_3VCF_26getformat, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_26getformat)};
+static PyObject *__pyx_pf_4cvcf_3VCF_26getformat(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("getformat");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":906
+  /* "cvcf.pyx":906
  *     def getformat(self):
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         return self._format             # <<<<<<<<<<<<<<
@@ -18290,7 +18069,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getformat(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":908
+/* "cvcf.pyx":908
  *         return self._format
  * 
  *     def setformat(self,format):             # <<<<<<<<<<<<<<
@@ -18298,10 +18077,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getformat(PyObject *__pyx_self, PyObject *_
  *         self._format = format
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_setformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setformat = {__Pyx_NAMESTR("setformat"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_setformat)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_27setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_27setformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_27setformat = {__Pyx_NAMESTR("setformat"), (PyCFunction)__pyx_pf_4cvcf_3VCF_27setformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_27setformat)};
+static PyObject *__pyx_pf_4cvcf_3VCF_27setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_format = 0;
   PyObject *__pyx_r = NULL;
@@ -18349,7 +18128,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setformat(PyObject *__pyx_self, PyObject *_
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":910
+  /* "cvcf.pyx":910
  *     def setformat(self,format):
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         self._format = format             # <<<<<<<<<<<<<<
@@ -18369,7 +18148,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setformat(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":912
+/* "cvcf.pyx":912
  *         self._format = format
  * 
  *     def getfilter(self):             # <<<<<<<<<<<<<<
@@ -18377,16 +18156,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setformat(PyObject *__pyx_self, PyObject *_
  *         return self._filter
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_getfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_getfilter = {__Pyx_NAMESTR("getfilter"), (PyCFunction)__pyx_pf_4cvcf_3VCF_getfilter, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_getfilter)};
-static PyObject *__pyx_pf_4cvcf_3VCF_getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_4cvcf_3VCF_28getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_28getfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_28getfilter = {__Pyx_NAMESTR("getfilter"), (PyCFunction)__pyx_pf_4cvcf_3VCF_28getfilter, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_28getfilter)};
+static PyObject *__pyx_pf_4cvcf_3VCF_28getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   __Pyx_RefNannySetupContext("getfilter");
   __pyx_self = __pyx_self;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":914
+  /* "cvcf.pyx":914
  *     def getfilter(self):
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         return self._filter             # <<<<<<<<<<<<<<
@@ -18412,7 +18191,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getfilter(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":916
+/* "cvcf.pyx":916
  *         return self._filter
  * 
  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
@@ -18420,10 +18199,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_getfilter(PyObject *__pyx_self, PyObject *_
  *         self._filter = filter
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_setfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setfilter = {__Pyx_NAMESTR("setfilter"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setfilter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_setfilter)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_29setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_29setfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_29setfilter = {__Pyx_NAMESTR("setfilter"), (PyCFunction)__pyx_pf_4cvcf_3VCF_29setfilter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_29setfilter)};
+static PyObject *__pyx_pf_4cvcf_3VCF_29setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_filter = 0;
   PyObject *__pyx_r = NULL;
@@ -18471,7 +18250,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setfilter(PyObject *__pyx_self, PyObject *_
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":918
+  /* "cvcf.pyx":918
  *     def setfilter(self,filter):
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         self._filter = filter             # <<<<<<<<<<<<<<
@@ -18491,7 +18270,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setfilter(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":920
+/* "cvcf.pyx":920
  *         self._filter = filter
  * 
  *     def setversion(self, version):             # <<<<<<<<<<<<<<
@@ -18499,9 +18278,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setfilter(PyObject *__pyx_self, PyObject *_
  *         self._version = version
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setversion = {__Pyx_NAMESTR("setversion"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setversion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_30setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_30setversion = {__Pyx_NAMESTR("setversion"), (PyCFunction)__pyx_pf_4cvcf_3VCF_30setversion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_30setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_version = 0;
   PyObject *__pyx_r = NULL;
@@ -18509,7 +18288,6 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *
   int __pyx_t_2;
   int __pyx_t_3;
   int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__version,0};
   __Pyx_RefNannySetupContext("setversion");
   __pyx_self = __pyx_self;
@@ -18554,7 +18332,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":921
+  /* "cvcf.pyx":921
  * 
  *     def setversion(self, version):
  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")             # <<<<<<<<<<<<<<
@@ -18575,22 +18353,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *
     __pyx_t_4 = __pyx_t_2;
   }
   if (__pyx_t_4) {
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_120), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_70));
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_70));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70));
-    __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_Raise(__pyx_t_1, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_5, 0, 0);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":922
+  /* "cvcf.pyx":922
  *     def setversion(self, version):
  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
  *         self._version = version             # <<<<<<<<<<<<<<
@@ -18603,7 +18375,6 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_5);
   __Pyx_AddTraceback("cvcf.VCF.setversion");
   __pyx_r = NULL;
   __pyx_L0:;
@@ -18612,7 +18383,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":924
+/* "cvcf.pyx":924
  *         self._version = version
  * 
  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
@@ -18620,9 +18391,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setversion(PyObject *__pyx_self, PyObject *
  * 
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setregions = {__Pyx_NAMESTR("setregions"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setregions, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_31setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_31setregions = {__Pyx_NAMESTR("setregions"), (PyCFunction)__pyx_pf_4cvcf_3VCF_31setregions, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_31setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_regions = 0;
   PyObject *__pyx_r = NULL;
@@ -18670,7 +18441,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setregions(PyObject *__pyx_self, PyObject *
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":925
+  /* "cvcf.pyx":925
  * 
  *     def setregions(self, regions):
  *         self._regions = regions             # <<<<<<<<<<<<<<
@@ -18690,7 +18461,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setregions(PyObject *__pyx_self, PyObject *
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":927
+/* "cvcf.pyx":927
  *         self._regions = regions
  * 
  *     def setreference(self, ref):             # <<<<<<<<<<<<<<
@@ -18698,10 +18469,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setregions(PyObject *__pyx_self, PyObject *
  *         self._reference = ref
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_setreference[] = " Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_setreference = {__Pyx_NAMESTR("setreference"), (PyCFunction)__pyx_pf_4cvcf_3VCF_setreference, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_setreference)};
-static PyObject *__pyx_pf_4cvcf_3VCF_setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_32setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_32setreference[] = " Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_32setreference = {__Pyx_NAMESTR("setreference"), (PyCFunction)__pyx_pf_4cvcf_3VCF_32setreference, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_32setreference)};
+static PyObject *__pyx_pf_4cvcf_3VCF_32setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_ref = 0;
   PyObject *__pyx_r = NULL;
@@ -18749,7 +18520,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setreference(PyObject *__pyx_self, PyObject
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":929
+  /* "cvcf.pyx":929
  *     def setreference(self, ref):
  *         """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
  *         self._reference = ref             # <<<<<<<<<<<<<<
@@ -18769,7 +18540,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setreference(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":931
+/* "cvcf.pyx":931
  *         self._reference = ref
  * 
  *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
@@ -18777,9 +18548,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_setreference(PyObject *__pyx_self, PyObject
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_ignoreerror = {__Pyx_NAMESTR("ignoreerror"), (PyCFunction)__pyx_pf_4cvcf_3VCF_ignoreerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_33ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_33ignoreerror = {__Pyx_NAMESTR("ignoreerror"), (PyCFunction)__pyx_pf_4cvcf_3VCF_33ignoreerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_33ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_errorstring = 0;
   PyObject *__pyx_r = NULL;
@@ -18833,7 +18604,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":932
+  /* "cvcf.pyx":932
  * 
  *     def ignoreerror(self, errorstring):
  *         try:             self._ignored_errors.add(self.__dict__[errorstring])             # <<<<<<<<<<<<<<
@@ -18858,14 +18629,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject
       __Pyx_GOTREF(__pyx_t_3);
       __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 = 932; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     }
     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
@@ -18877,7 +18648,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":933
+    /* "cvcf.pyx":933
  *     def ignoreerror(self, errorstring):
  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)             # <<<<<<<<<<<<<<
@@ -18891,16 +18662,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_v_errorstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), __pyx_v_errorstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
       PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
       __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
       __Pyx_Raise(__pyx_t_5, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
@@ -18939,7 +18710,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":935
+/* "cvcf.pyx":935
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
  * 
  *     def warnerror(self, errorstring):             # <<<<<<<<<<<<<<
@@ -18947,9 +18718,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_ignoreerror(PyObject *__pyx_self, PyObject
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_warnerror = {__Pyx_NAMESTR("warnerror"), (PyCFunction)__pyx_pf_4cvcf_3VCF_warnerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_34warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_34warnerror = {__Pyx_NAMESTR("warnerror"), (PyCFunction)__pyx_pf_4cvcf_3VCF_34warnerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pf_4cvcf_3VCF_34warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_errorstring = 0;
   PyObject *__pyx_r = NULL;
@@ -19003,7 +18774,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *_
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":936
+  /* "cvcf.pyx":936
  * 
  *     def warnerror(self, errorstring):
  *         try:             self._warn_errors.add(self.__dict__[errorstring])             # <<<<<<<<<<<<<<
@@ -19028,14 +18799,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *_
       __Pyx_GOTREF(__pyx_t_3);
       __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 = 936; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     }
     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
@@ -19047,7 +18818,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *_
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":937
+    /* "cvcf.pyx":937
  *     def warnerror(self, errorstring):
  *         try:             self._warn_errors.add(self.__dict__[errorstring])
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)             # <<<<<<<<<<<<<<
@@ -19061,16 +18832,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *_
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_v_errorstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), __pyx_v_errorstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
       PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
       __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
       __Pyx_Raise(__pyx_t_5, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
@@ -19109,7 +18880,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":939
+/* "cvcf.pyx":939
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
  * 
  *     def parse(self, stream):             # <<<<<<<<<<<<<<
@@ -19117,10 +18888,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_warnerror(PyObject *__pyx_self, PyObject *_
  *         last_line = self._parse_header(stream)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_parse[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_parse = {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pf_4cvcf_3VCF_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_parse)};
-static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_35parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_35parse[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_35parse = {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pf_4cvcf_3VCF_35parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_35parse)};
+static PyObject *__pyx_pf_4cvcf_3VCF_35parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_last_line;
@@ -19173,7 +18944,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_last_line = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":941
+  /* "cvcf.pyx":941
  *     def parse(self, stream):
  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
  *         last_line = self._parse_header(stream)             # <<<<<<<<<<<<<<
@@ -19183,19 +18954,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parse_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_stream);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
   __Pyx_GIVEREF(__pyx_v_stream);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_last_line);
   __pyx_v_last_line = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":944
+  /* "cvcf.pyx":944
  *         # now return a generator that does the actual work.  In this way the pre-processing is done
  *         # before the first piece of data is yielded
  *         return self._parse(last_line, stream)             # <<<<<<<<<<<<<<
@@ -19206,17 +18977,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_last_line);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_last_line);
   __Pyx_GIVEREF(__pyx_v_last_line);
   __Pyx_INCREF(__pyx_v_stream);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_stream);
   __Pyx_GIVEREF(__pyx_v_stream);
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
@@ -19236,7 +19007,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":946
+/* "cvcf.pyx":946
  *         return self._parse(last_line, stream)
  * 
  *     def write(self, stream, datagenerator):             # <<<<<<<<<<<<<<
@@ -19244,10 +19015,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_parse(PyObject *__pyx_self, PyObject *__pyx
  *         self.write_header(stream)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_write[] = " Writes a VCF file to a stream, using a data generator (or list) ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_write = {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pf_4cvcf_3VCF_write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_write)};
-static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_36write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_36write[] = " Writes a VCF file to a stream, using a data generator (or list) ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_36write = {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pf_4cvcf_3VCF_36write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_36write)};
+static PyObject *__pyx_pf_4cvcf_3VCF_36write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_datagenerator = 0;
@@ -19312,7 +19083,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx
   __pyx_L4_argument_unpacking_done:;
   __pyx_v_data = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":948
+  /* "cvcf.pyx":948
  *     def write(self, stream, datagenerator):
  *         """ Writes a VCF file to a stream, using a data generator (or list) """
  *         self.write_header(stream)             # <<<<<<<<<<<<<<
@@ -19322,17 +19093,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_stream);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
   __Pyx_GIVEREF(__pyx_v_stream);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":949
+  /* "cvcf.pyx":949
  *         """ Writes a VCF file to a stream, using a data generator (or list) """
  *         self.write_header(stream)
  *         self.write_heading(stream)             # <<<<<<<<<<<<<<
@@ -19342,17 +19113,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_heading); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_stream);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
   __Pyx_GIVEREF(__pyx_v_stream);
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":950
+  /* "cvcf.pyx":950
  *         self.write_header(stream)
  *         self.write_heading(stream)
  *         for data in datagenerator: self.write_data(stream,data)             # <<<<<<<<<<<<<<
@@ -19386,17 +19157,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx
     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __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 = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_INCREF(__pyx_v_stream);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stream);
     __Pyx_GIVEREF(__pyx_v_stream);
     __Pyx_INCREF(__pyx_v_data);
     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
     __Pyx_GIVEREF(__pyx_v_data);
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -19417,7 +19188,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":952
+/* "cvcf.pyx":952
  *         for data in datagenerator: self.write_data(stream,data)
  * 
  *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
@@ -19425,10 +19196,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_write(PyObject *__pyx_self, PyObject *__pyx
  *         self.write_header(stream)
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_writeheader[] = " Writes a VCF header ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_writeheader = {__Pyx_NAMESTR("writeheader"), (PyCFunction)__pyx_pf_4cvcf_3VCF_writeheader, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_writeheader)};
-static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_37writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_37writeheader[] = " Writes a VCF header ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_37writeheader = {__Pyx_NAMESTR("writeheader"), (PyCFunction)__pyx_pf_4cvcf_3VCF_37writeheader, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_37writeheader)};
+static PyObject *__pyx_pf_4cvcf_3VCF_37writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_r = NULL;
@@ -19479,7 +19250,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":954
+  /* "cvcf.pyx":954
  *     def writeheader(self, stream):
  *         """ Writes a VCF header """
  *         self.write_header(stream)             # <<<<<<<<<<<<<<
@@ -19489,17 +19260,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject
   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_stream);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
   __Pyx_GIVEREF(__pyx_v_stream);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":955
+  /* "cvcf.pyx":955
  *         """ Writes a VCF header """
  *         self.write_header(stream)
  *         self.write_heading(stream)             # <<<<<<<<<<<<<<
@@ -19509,14 +19280,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject
   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_heading); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_stream);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
   __Pyx_GIVEREF(__pyx_v_stream);
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -19533,7 +19304,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":957
+/* "cvcf.pyx":957
  *         self.write_heading(stream)
  * 
  *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):             # <<<<<<<<<<<<<<
@@ -19541,10 +19312,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_writeheader(PyObject *__pyx_self, PyObject
  *         # a variant should always be assigned to a unique position, one base before
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_compare_calls[] = " Utility function: compares two calls for equality ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_compare_calls = {__Pyx_NAMESTR("compare_calls"), (PyCFunction)__pyx_pf_4cvcf_3VCF_compare_calls, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_compare_calls)};
-static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_38compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_38compare_calls[] = " Utility function: compares two calls for equality ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_38compare_calls = {__Pyx_NAMESTR("compare_calls"), (PyCFunction)__pyx_pf_4cvcf_3VCF_38compare_calls, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_38compare_calls)};
+static PyObject *__pyx_pf_4cvcf_3VCF_38compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_pos1 = 0;
   PyObject *__pyx_v_ref1 = 0;
@@ -19654,7 +19425,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObjec
   __Pyx_INCREF(__pyx_v_ref2);
   __Pyx_INCREF(__pyx_v_alt2);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":962
+  /* "cvcf.pyx":962
  *         # the leftmost position of the alignment gap.  If this rule is implemented
  *         # correctly, the two positions must be equal for the calls to be identical.
  *         if pos1 != pos2: return False             # <<<<<<<<<<<<<<
@@ -19676,7 +19447,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObjec
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":965
+  /* "cvcf.pyx":965
  *         # from both calls, trim rightmost bases when identical.  Do this safely, i.e.
  *         # only when the reference bases are not Ns
  *         while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:             # <<<<<<<<<<<<<<
@@ -19710,34 +19481,34 @@ static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObjec
     }
     if (!__pyx_t_4) break;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":966
+    /* "cvcf.pyx":966
  *         # only when the reference bases are not Ns
  *         while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:
  *             ref1 = ref1[:-1]             # <<<<<<<<<<<<<<
  *             alt1 = alt1[:-1]
  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
  */
-    __pyx_t_6 = PySequence_GetSlice(__pyx_v_ref1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_ref1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_v_ref1);
     __pyx_v_ref1 = __pyx_t_6;
     __pyx_t_6 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":967
+    /* "cvcf.pyx":967
  *         while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:
  *             ref1 = ref1[:-1]
  *             alt1 = alt1[:-1]             # <<<<<<<<<<<<<<
  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
  *             ref2 = ref2[:-1]
  */
-    __pyx_t_6 = PySequence_GetSlice(__pyx_v_alt1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_alt1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_v_alt1);
     __pyx_v_alt1 = __pyx_t_6;
     __pyx_t_6 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":968
+  /* "cvcf.pyx":968
  *             ref1 = ref1[:-1]
  *             alt1 = alt1[:-1]
  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:             # <<<<<<<<<<<<<<
@@ -19771,34 +19542,34 @@ static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObjec
     }
     if (!__pyx_t_2) break;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":969
+    /* "cvcf.pyx":969
  *             alt1 = alt1[:-1]
  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
  *             ref2 = ref2[:-1]             # <<<<<<<<<<<<<<
  *             alt2 = alt2[:-1]
  *         # now, the alternative alleles must be identical
  */
-    __pyx_t_1 = PySequence_GetSlice(__pyx_v_ref2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_ref2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_ref2);
     __pyx_v_ref2 = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":970
+    /* "cvcf.pyx":970
  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
  *             ref2 = ref2[:-1]
  *             alt2 = alt2[:-1]             # <<<<<<<<<<<<<<
  *         # now, the alternative alleles must be identical
  *         return alt1 == alt2
  */
-    __pyx_t_1 = PySequence_GetSlice(__pyx_v_alt2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_alt2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_v_alt2);
     __pyx_v_alt2 = __pyx_t_1;
     __pyx_t_1 = 0;
   }
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":972
+  /* "cvcf.pyx":972
  *             alt2 = alt2[:-1]
  *         # now, the alternative alleles must be identical
  *         return alt1 == alt2             # <<<<<<<<<<<<<<
@@ -19830,7 +19601,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObjec
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":979
+/* "cvcf.pyx":979
  * ###########################################################################################################
  * 
  *     def connect( self, filename ):             # <<<<<<<<<<<<<<
@@ -19838,10 +19609,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_compare_calls(PyObject *__pyx_self, PyObjec
  *         self.tabixfile = pysam.Tabixfile( filename )
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_connect[] = "connect to tabix file.";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_connect = {__Pyx_NAMESTR("connect"), (PyCFunction)__pyx_pf_4cvcf_3VCF_connect, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_connect)};
-static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_39connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_39connect[] = "connect to tabix file.";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_39connect = {__Pyx_NAMESTR("connect"), (PyCFunction)__pyx_pf_4cvcf_3VCF_39connect, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_39connect)};
+static PyObject *__pyx_pf_4cvcf_3VCF_39connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_filename = 0;
   PyObject *__pyx_r = NULL;
@@ -19892,7 +19663,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__p
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":981
+  /* "cvcf.pyx":981
  *     def connect( self, filename ):
  *         '''connect to tabix file.'''
  *         self.tabixfile = pysam.Tabixfile( filename )             # <<<<<<<<<<<<<<
@@ -19905,18 +19676,18 @@ static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__p
   __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 = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__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 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__tabixfile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":982
+  /* "cvcf.pyx":982
  *         '''connect to tabix file.'''
  *         self.tabixfile = pysam.Tabixfile( filename )
  *         self._parse_header(self.tabixfile.header)             # <<<<<<<<<<<<<<
@@ -19931,14 +19702,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__p
   __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 = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -19955,7 +19726,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":984
+/* "cvcf.pyx":984
  *         self._parse_header(self.tabixfile.header)
  * 
  *     def fetch(self,             # <<<<<<<<<<<<<<
@@ -19963,10 +19734,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_connect(PyObject *__pyx_self, PyObject *__p
  *               start = None,
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_fetch[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_fetch = {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_4cvcf_3VCF_fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_fetch)};
-static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_40fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_40fetch[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_40fetch = {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_4cvcf_3VCF_40fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_40fetch)};
+static PyObject *__pyx_pf_4cvcf_3VCF_40fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_reference = 0;
   PyObject *__pyx_v_start = 0;
@@ -19985,7 +19756,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
     PyObject* values[5] = {0,0,0,0,0};
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":985
+    /* "cvcf.pyx":985
  * 
  *     def fetch(self,
  *               reference = None,             # <<<<<<<<<<<<<<
@@ -19994,7 +19765,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  */
     values[1] = ((PyObject *)Py_None);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":986
+    /* "cvcf.pyx":986
  *     def fetch(self,
  *               reference = None,
  *               start = None,             # <<<<<<<<<<<<<<
@@ -20003,7 +19774,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  */
     values[2] = ((PyObject *)Py_None);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":987
+    /* "cvcf.pyx":987
  *               reference = None,
  *               start = None,
  *               end = None,             # <<<<<<<<<<<<<<
@@ -20012,7 +19783,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  */
     values[3] = ((PyObject *)Py_None);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":988
+    /* "cvcf.pyx":988
  *               start = None,
  *               end = None,
  *               region = None ):             # <<<<<<<<<<<<<<
@@ -20065,7 +19836,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
     __pyx_v_region = values[4];
   } else {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":985
+    /* "cvcf.pyx":985
  * 
  *     def fetch(self,
  *               reference = None,             # <<<<<<<<<<<<<<
@@ -20074,7 +19845,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  */
     __pyx_v_reference = ((PyObject *)Py_None);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":986
+    /* "cvcf.pyx":986
  *     def fetch(self,
  *               reference = None,
  *               start = None,             # <<<<<<<<<<<<<<
@@ -20083,7 +19854,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  */
     __pyx_v_start = ((PyObject *)Py_None);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":987
+    /* "cvcf.pyx":987
  *               reference = None,
  *               start = None,
  *               end = None,             # <<<<<<<<<<<<<<
@@ -20092,7 +19863,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  */
     __pyx_v_end = ((PyObject *)Py_None);
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":988
+    /* "cvcf.pyx":988
  *               start = None,
  *               end = None,
  *               region = None ):             # <<<<<<<<<<<<<<
@@ -20119,7 +19890,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":991
+  /* "cvcf.pyx":991
  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
  * 
  *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )             # <<<<<<<<<<<<<<
@@ -20133,7 +19904,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_reference);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
   __Pyx_GIVEREF(__pyx_v_reference);
@@ -20149,19 +19920,19 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
   __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
   __Pyx_INCREF(__pyx_v_self);
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
   __Pyx_GIVEREF(__pyx_v_self);
-  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cvcf_asVCFRecord)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cvcf_asVCFRecord)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
   if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__parser), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __pyx_r = __pyx_t_5;
   __pyx_t_5 = 0;
@@ -20183,7 +19954,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
   return __pyx_r;
 }
 
-/* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":993
+/* "cvcf.pyx":993
  *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
  * 
  *     def validate( self, record ):             # <<<<<<<<<<<<<<
@@ -20191,10 +19962,10 @@ static PyObject *__pyx_pf_4cvcf_3VCF_fetch(PyObject *__pyx_self, PyObject *__pyx
  * 
  */
 
-static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_4cvcf_3VCF_validate[] = "validate vcf record.\n\n        returns a validated record.\n        ";
-static PyMethodDef __pyx_mdef_4cvcf_3VCF_validate = {__Pyx_NAMESTR("validate"), (PyCFunction)__pyx_pf_4cvcf_3VCF_validate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_validate)};
-static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pf_4cvcf_3VCF_41validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cvcf_3VCF_41validate[] = "validate vcf record.\n\n        returns a validated record.\n        ";
+static PyMethodDef __pyx_mdef_4cvcf_3VCF_41validate = {__Pyx_NAMESTR("validate"), (PyCFunction)__pyx_pf_4cvcf_3VCF_41validate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_41validate)};
+static PyObject *__pyx_pf_4cvcf_3VCF_41validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_record = 0;
   PyObject *__pyx_v_chrom;
@@ -20219,7 +19990,6 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   int __pyx_v_movable;
   PyObject *__pyx_v_longest;
   PyObject *__pyx_v_shortest;
-  PyObject *__pyx_8genexpr1__pyx_v_allele;
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
@@ -20291,163 +20061,156 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   __pyx_v_faref_leftflank = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_faref = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_newalts = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_newalts = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_a = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_l = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_addns = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_na = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_s = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_v_alt = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_alt = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_addn = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_allele = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_longest = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_shortest = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_8genexpr1__pyx_v_allele = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":999
+  /* "cvcf.pyx":999
  *         '''
  * 
  *         raise NotImplementedError( "needs to be checked" )             # <<<<<<<<<<<<<<
  * 
  *         chrom, pos = record.chrom, record.pos
  */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_123), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_72));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_72));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72));
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_Raise(__pyx_t_1, 0, 0);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_Raise(__pyx_t_2, 0, 0);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1001
+  /* "cvcf.pyx":1001
  *         raise NotImplementedError( "needs to be checked" )
  * 
  *         chrom, pos = record.chrom, record.pos             # <<<<<<<<<<<<<<
  * 
  *         # check reference
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__chrom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__chrom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_v_chrom);
-  __pyx_v_chrom = __pyx_t_2;
-  __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_v_pos);
-  __pyx_v_pos = __pyx_t_1;
+  __pyx_v_chrom = __pyx_t_1;
   __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_v_pos);
+  __pyx_v_pos = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1004
+  /* "cvcf.pyx":1004
  * 
  *         # check reference
  *         ref = record.ref             # <<<<<<<<<<<<<<
  *         if ref == ".":
  *             self.error(str(record),self.MISSING_REF)
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_v_ref);
-  __pyx_v_ref = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_ref = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1005
+  /* "cvcf.pyx":1005
  *         # check reference
  *         ref = record.ref
  *         if ref == ".":             # <<<<<<<<<<<<<<
  *             self.error(str(record),self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_ref, ((PyObject *)__pyx_kp_s_6), Py_EQ); 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_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 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_2 = PyObject_RichCompare(__pyx_v_ref, ((PyObject *)__pyx_kp_s_9), Py_EQ); 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);
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1006
+    /* "cvcf.pyx":1006
  *         ref = record.ref
  *         if ref == ".":
  *             self.error(str(record),self.MISSING_REF)             # <<<<<<<<<<<<<<
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
  *             else:                   ref = ""
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
     __Pyx_INCREF(__pyx_v_record);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_record);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record);
     __Pyx_GIVEREF(__pyx_v_record);
-    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__MISSING_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__MISSING_REF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
     __Pyx_GIVEREF(__pyx_t_4);
-    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_4 = 0;
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1007
+    /* "cvcf.pyx":1007
  *         if ref == ".":
  *             self.error(str(record),self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)             # <<<<<<<<<<<<<<
  *             else:                   ref = ""
  *         else:
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_3) {
       __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyNumber_Add(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
       __Pyx_INCREF(__pyx_v_chrom);
       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom);
       __Pyx_GIVEREF(__pyx_v_chrom);
       __Pyx_INCREF(__pyx_v_pos);
       PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_pos);
       __Pyx_GIVEREF(__pyx_v_pos);
-      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
       __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_2 = 0;
+      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __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_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
       __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __pyx_v_ref = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L7;
     }
     /*else*/ {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1008
+      /* "cvcf.pyx":1008
  *             self.error(str(record),self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
  *             else:                   ref = ""             # <<<<<<<<<<<<<<
@@ -20463,7 +20226,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1010
+    /* "cvcf.pyx":1010
  *             else:                   ref = ""
  *         else:
  *             for c in ref:             # <<<<<<<<<<<<<<
@@ -20471,20 +20234,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                 if "N" in ref: ref = get_sequence(chrom,
  */
     if (PyList_CheckExact(__pyx_v_ref) || PyTuple_CheckExact(__pyx_v_ref)) {
-      __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_1);
+      __pyx_t_6 = 0; __pyx_t_2 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_2);
     } else {
-      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
     }
     for (;;) {
-      if (likely(PyList_CheckExact(__pyx_t_1))) {
-        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
-        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
-      } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
-        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
+      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
       } else {
-        __pyx_t_4 = PyIter_Next(__pyx_t_1);
+        __pyx_t_4 = PyIter_Next(__pyx_t_2);
         if (!__pyx_t_4) {
           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
@@ -20495,7 +20258,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __pyx_v_c = __pyx_t_4;
       __pyx_t_4 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1011
+      /* "cvcf.pyx":1011
  *         else:
  *             for c in ref:
  *                 if c not in "ACGTN": self.error(str(record),self.UNKNOWN_CHAR_IN_REF)             # <<<<<<<<<<<<<<
@@ -20507,33 +20270,33 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
         __Pyx_INCREF(__pyx_v_record);
         PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_record);
         __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); 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);
+        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
         __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__UNKNOWN_CHAR_IN_REF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
         __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
         PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
         __Pyx_GIVEREF(__pyx_t_5);
-        __pyx_t_2 = 0;
+        __pyx_t_1 = 0;
         __pyx_t_5 = 0;
-        __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         goto __pyx_L10;
       }
       __pyx_L10:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1012
+      /* "cvcf.pyx":1012
  *             for c in ref:
  *                 if c not in "ACGTN": self.error(str(record),self.UNKNOWN_CHAR_IN_REF)
  *                 if "N" in ref: ref = get_sequence(chrom,             # <<<<<<<<<<<<<<
@@ -20545,7 +20308,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1014
+        /* "cvcf.pyx":1014
  *                 if "N" in ref: ref = get_sequence(chrom,
  *                                                   pos,
  *                                                   pos+len(ref),             # <<<<<<<<<<<<<<
@@ -20559,7 +20322,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1015
+        /* "cvcf.pyx":1015
  *                                                   pos,
  *                                                   pos+len(ref),
  *                                                   self._reference)             # <<<<<<<<<<<<<<
@@ -20568,24 +20331,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); 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);
-        __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         __Pyx_INCREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
         __Pyx_INCREF(__pyx_v_pos);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
+        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
         __Pyx_GIVEREF(__pyx_v_pos);
-        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
+        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
         __Pyx_GIVEREF(__pyx_t_4);
-        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
+        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_7);
         __Pyx_GIVEREF(__pyx_t_7);
         __pyx_t_4 = 0;
         __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __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_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_v_ref);
         __pyx_v_ref = __pyx_t_7;
         __pyx_t_7 = 0;
@@ -20593,101 +20356,101 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       }
       __pyx_L11:;
     }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   }
   __pyx_L6:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1018
+  /* "cvcf.pyx":1018
  * 
  *         # make sure reference is sane
  *         if self._reference:             # <<<<<<<<<<<<<<
  *             left = max(0,self.pos-100)
  *             faref_leftflank = get_sequence(chrom,left,self.pos+len(ref),self._reference)
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); 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_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1019
+    /* "cvcf.pyx":1019
  *         # make sure reference is sane
  *         if self._reference:
  *             left = max(0,self.pos-100)             # <<<<<<<<<<<<<<
  *             faref_leftflank = get_sequence(chrom,left,self.pos+len(ref),self._reference)
  *             faref = faref_leftflank[pos-left:]
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_7 = PyNumber_Subtract(__pyx_t_1, __pyx_int_100); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_int_100); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_9 = 0;
-    __pyx_t_2 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_GT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_GT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_3) {
       __Pyx_INCREF(__pyx_t_7);
-      __pyx_t_1 = __pyx_t_7;
+      __pyx_t_2 = __pyx_t_7;
     } else {
       __pyx_t_5 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_1 = __pyx_t_5;
+      __pyx_t_2 = __pyx_t_5;
       __pyx_t_5 = 0;
     }
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_v_left);
-    __pyx_v_left = __pyx_t_1;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_left = __pyx_t_2;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1020
+    /* "cvcf.pyx":1020
  *         if self._reference:
  *             left = max(0,self.pos-100)
  *             faref_leftflank = get_sequence(chrom,left,self.pos+len(ref),self._reference)             # <<<<<<<<<<<<<<
  *             faref = faref_leftflank[pos-left:]
  *             if faref != ref: self.error(str(record),self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
     __Pyx_INCREF(__pyx_v_chrom);
     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom);
     __Pyx_GIVEREF(__pyx_v_chrom);
     __Pyx_INCREF(__pyx_v_left);
     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_left);
     __Pyx_GIVEREF(__pyx_v_left);
-    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
     PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5);
     __Pyx_GIVEREF(__pyx_t_5);
-    __pyx_t_2 = 0;
+    __pyx_t_1 = 0;
     __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __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_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
     __Pyx_DECREF(__pyx_v_faref_leftflank);
     __pyx_v_faref_leftflank = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1021
+    /* "cvcf.pyx":1021
  *             left = max(0,self.pos-100)
  *             faref_leftflank = get_sequence(chrom,left,self.pos+len(ref),self._reference)
  *             faref = faref_leftflank[pos-left:]             # <<<<<<<<<<<<<<
@@ -20698,13 +20461,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PySequence_GetSlice(__pyx_v_faref_leftflank, __pyx_t_6, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_faref_leftflank, __pyx_t_6, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_v_faref);
     __pyx_v_faref = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1022
+    /* "cvcf.pyx":1022
  *             faref_leftflank = get_sequence(chrom,left,self.pos+len(ref),self._reference)
  *             faref = faref_leftflank[pos-left:]
  *             if faref != ref: self.error(str(record),self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))             # <<<<<<<<<<<<<<
@@ -20719,47 +20482,47 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
       __Pyx_INCREF(__pyx_v_record);
       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_record);
       __Pyx_GIVEREF(__pyx_v_record);
-      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_7, 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_7); __pyx_t_7 = 0;
+      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
       __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__WRONG_REF); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyTuple_New(2); 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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
       __Pyx_INCREF(__pyx_v_faref);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_faref);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_faref);
       __Pyx_GIVEREF(__pyx_v_faref);
       __Pyx_INCREF(__pyx_v_ref);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ref);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref);
       __Pyx_GIVEREF(__pyx_v_ref);
-      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_103), ((PyObject *)__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(((PyObject *)__pyx_t_4));
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyTuple_New(3); 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);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_4));
+      PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_t_4));
       __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
-      __pyx_t_1 = 0;
+      __pyx_t_2 = 0;
       __pyx_t_7 = 0;
       __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); 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_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       goto __pyx_L13;
     }
     __pyx_L13:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1023
+    /* "cvcf.pyx":1023
  *             faref = faref_leftflank[pos-left:]
  *             if faref != ref: self.error(str(record),self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
  *             ref = faref             # <<<<<<<<<<<<<<
@@ -20773,7 +20536,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   }
   __pyx_L12:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1026
+  /* "cvcf.pyx":1026
  * 
  *         # check: format fields are defined
  *         for f in record.format:             # <<<<<<<<<<<<<<
@@ -20783,21 +20546,21 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   __pyx_t_4 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
-    __pyx_t_6 = 0; __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
   }
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
+    if (likely(PyList_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
     } else {
-      __pyx_t_4 = PyIter_Next(__pyx_t_2);
+      __pyx_t_4 = PyIter_Next(__pyx_t_1);
       if (!__pyx_t_4) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
@@ -20808,7 +20571,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_v_f = __pyx_t_4;
     __pyx_t_4 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1027
+    /* "cvcf.pyx":1027
  *         # check: format fields are defined
  *         for f in record.format:
  *             if f not in self._format: self.error(str(record),self.FORMAT_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
@@ -20823,119 +20586,119 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __Pyx_INCREF(__pyx_v_record);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_record);
       __Pyx_GIVEREF(__pyx_v_record);
-      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
+      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
       __Pyx_GIVEREF(__pyx_t_5);
       __Pyx_INCREF(__pyx_v_f);
-      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_f);
+      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
       __pyx_t_7 = 0;
       __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       goto __pyx_L16;
     }
     __pyx_L16:;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1030
+  /* "cvcf.pyx":1030
  * 
  *         # check: all filters are defined
  *         for f in record.filter:             # <<<<<<<<<<<<<<
  *             if f not in self._filter: self.error(str(record),self.FILTER_NOT_DEFINED, f)
  * 
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-    __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__filter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5);
   } else {
-    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   for (;;) {
     if (likely(PyList_CheckExact(__pyx_t_5))) {
       if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
     } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
       if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
     } else {
-      __pyx_t_2 = PyIter_Next(__pyx_t_5);
-      if (!__pyx_t_2) {
+      __pyx_t_1 = PyIter_Next(__pyx_t_5);
+      if (!__pyx_t_1) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_1);
     }
     __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_v_f = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1031
+    /* "cvcf.pyx":1031
  *         # check: all filters are defined
  *         for f in record.filter:
  *             if f not in self._filter: self.error(str(record),self.FILTER_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
  * 
  *         # convert v3.3 alleles
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_2, __pyx_v_f))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_1, __pyx_v_f))); if (unlikely(__pyx_t_3 < 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_3) {
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
       __Pyx_INCREF(__pyx_v_record);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_record);
       __Pyx_GIVEREF(__pyx_v_record);
-      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
       __Pyx_GIVEREF(__pyx_t_4);
-      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_f);
       PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
       __pyx_t_4 = 0;
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __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_7); __pyx_t_7 = 0;
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       goto __pyx_L19;
     }
     __pyx_L19:;
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1034
+  /* "cvcf.pyx":1034
  * 
  *         # convert v3.3 alleles
  *         if self._version == 33:             # <<<<<<<<<<<<<<
@@ -20944,14 +20707,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
   __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __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 = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1035
+    /* "cvcf.pyx":1035
  *         # convert v3.3 alleles
  *         if self._version == 33:
  *             if len(ref) != 1: self.error(str(record),self.V33_BAD_REF)             # <<<<<<<<<<<<<<
@@ -20961,36 +20724,36 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_3 = (__pyx_t_6 != 1);
     if (__pyx_t_3) {
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
       __Pyx_INCREF(__pyx_v_record);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_record);
       __Pyx_GIVEREF(__pyx_v_record);
-      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_REF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
       __Pyx_GIVEREF(__pyx_t_5);
       __pyx_t_7 = 0;
       __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __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_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       goto __pyx_L21;
     }
     __pyx_L21:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1036
+    /* "cvcf.pyx":1036
  *         if self._version == 33:
  *             if len(ref) != 1: self.error(str(record),self.V33_BAD_REF)
  *             newalts = []             # <<<<<<<<<<<<<<
@@ -21003,7 +20766,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_v_newalts = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1037
+    /* "cvcf.pyx":1037
  *             if len(ref) != 1: self.error(str(record),self.V33_BAD_REF)
  *             newalts = []
  *             have_deletions = False             # <<<<<<<<<<<<<<
@@ -21012,26 +20775,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
     __pyx_v_have_deletions = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1038
+    /* "cvcf.pyx":1038
  *             newalts = []
  *             have_deletions = False
  *             for a in alt:             # <<<<<<<<<<<<<<
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  */
-    if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-      __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-    } else {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_v_alt == Py_None)) {
+      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
+    __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
     for (;;) {
       if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
       __Pyx_DECREF(__pyx_v_a);
-      __pyx_v_a = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_v_a = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1039
+      /* "cvcf.pyx":1039
  *             have_deletions = False
  *             for a in alt:
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference             # <<<<<<<<<<<<<<
@@ -21041,81 +20803,69 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __pyx_t_8 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_3 = (__pyx_t_8 == 1);
       if (__pyx_t_3) {
-        __pyx_t_2 = PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_1 = PyNumber_Add(__pyx_v_a, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __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_v_a, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_v_a);
-        __pyx_v_a = __pyx_t_1;
-        __pyx_t_1 = 0;
+        __pyx_v_a = __pyx_t_2;
+        __pyx_t_2 = 0;
         goto __pyx_L24;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1040
+      /* "cvcf.pyx":1040
  *             for a in alt:
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference             # <<<<<<<<<<<<<<
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True
  */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__I));
-      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
-      __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       if (__pyx_t_3) {
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_2 = PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
         __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_v_a);
-        __pyx_v_a = __pyx_t_7;
-        __pyx_t_7 = 0;
+        __pyx_v_a = __pyx_t_1;
+        __pyx_t_1 = 0;
         goto __pyx_L24;
       }
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1041
+      /* "cvcf.pyx":1041
  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  *                 elif a.startswith('D'): # allow D<seq> and D<num>             # <<<<<<<<<<<<<<
  *                     have_deletions = True
  *                     try:
  */
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__D));
-      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
-      __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_125), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       if (__pyx_t_3) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1042
+        /* "cvcf.pyx":1042
  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True             # <<<<<<<<<<<<<<
@@ -21124,7 +20874,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
         __pyx_v_have_deletions = 1;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1043
+        /* "cvcf.pyx":1043
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True
  *                     try:             # <<<<<<<<<<<<<<
@@ -21139,28 +20889,28 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           __Pyx_XGOTREF(__pyx_save_exc_tb);
           /*try:*/ {
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1044
+            /* "cvcf.pyx":1044
  *                     have_deletions = True
  *                     try:
  *                         l = int(a[1:])          # throws ValueError if sequence             # <<<<<<<<<<<<<<
  *                         if len(ref) < l:        # add to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  */
-            __pyx_t_1 = PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
             __Pyx_GOTREF(__pyx_t_2);
-            PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-            __Pyx_GIVEREF(__pyx_t_1);
-            __pyx_t_1 = 0;
-            __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+            __Pyx_GIVEREF(__pyx_t_2);
+            __pyx_t_2 = 0;
+            __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
             __Pyx_DECREF(__pyx_v_l);
-            __pyx_v_l = __pyx_t_1;
-            __pyx_t_1 = 0;
+            __pyx_v_l = __pyx_t_2;
+            __pyx_t_2 = 0;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1045
+            /* "cvcf.pyx":1045
  *                     try:
  *                         l = int(a[1:])          # throws ValueError if sequence
  *                         if len(ref) < l:        # add to reference if necessary             # <<<<<<<<<<<<<<
@@ -21168,57 +20918,57 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                             ref += addns
  */
             __pyx_t_8 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-            __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_l, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
             __Pyx_GOTREF(__pyx_t_2);
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-            __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_l, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __Pyx_GOTREF(__pyx_t_1);
             __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
             if (__pyx_t_3) {
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1046
+              /* "cvcf.pyx":1046
  *                         l = int(a[1:])          # throws ValueError if sequence
  *                         if len(ref) < l:        # add to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)             # <<<<<<<<<<<<<<
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  */
-              __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-              __Pyx_GOTREF(__pyx_t_2);
-              __pyx_t_8 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+              __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __pyx_t_7 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+              __pyx_t_8 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+              __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+              __Pyx_GOTREF(__pyx_t_2);
+              __pyx_t_7 = PyNumber_Add(__pyx_v_pos, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
               __Pyx_GOTREF(__pyx_t_7);
-              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-              __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-              __Pyx_GOTREF(__pyx_t_1);
+              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+              __pyx_t_2 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+              __Pyx_GOTREF(__pyx_t_2);
               __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
               __Pyx_GOTREF(__pyx_t_4);
               __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-              __Pyx_GOTREF(__pyx_t_10);
+              __Pyx_GOTREF(((PyObject *)__pyx_t_10));
               __Pyx_INCREF(__pyx_v_chrom);
               PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chrom);
               __Pyx_GIVEREF(__pyx_v_chrom);
               PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
               __Pyx_GIVEREF(__pyx_t_7);
-              PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1);
-              __Pyx_GIVEREF(__pyx_t_1);
+              PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_2);
+              __Pyx_GIVEREF(__pyx_t_2);
               PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_4);
               __Pyx_GIVEREF(__pyx_t_4);
               __pyx_t_7 = 0;
-              __pyx_t_1 = 0;
+              __pyx_t_2 = 0;
               __pyx_t_4 = 0;
-              __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+              __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
               __Pyx_GOTREF(__pyx_t_4);
-              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+              __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
               __Pyx_DECREF(__pyx_v_addns);
               __pyx_v_addns = __pyx_t_4;
               __pyx_t_4 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1047
+              /* "cvcf.pyx":1047
  *                         if len(ref) < l:        # add to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  *                             ref += addns             # <<<<<<<<<<<<<<
@@ -21231,7 +20981,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
               __pyx_v_ref = __pyx_t_4;
               __pyx_t_4 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1048
+              /* "cvcf.pyx":1048
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
@@ -21240,29 +20990,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
               __Pyx_INCREF(__pyx_int_0);
               __pyx_t_4 = __pyx_int_0;
-              if (likely(((PyObject *)__pyx_v_newalts) != Py_None)) {
-                __pyx_t_8 = 0; __pyx_t_10 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_10);
-              } else {
-                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-              }
+              __pyx_t_8 = 0; __pyx_t_10 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_10);
               for (;;) {
                 if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_10)) break;
-                __pyx_t_2 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
+                __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
                 __Pyx_DECREF(__pyx_v_na);
-                __pyx_v_na = __pyx_t_2;
-                __pyx_t_2 = 0;
+                __pyx_v_na = __pyx_t_1;
+                __pyx_t_1 = 0;
                 __Pyx_INCREF(__pyx_t_4);
                 __Pyx_DECREF(__pyx_v_i);
                 __pyx_v_i = __pyx_t_4;
-                __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-                __Pyx_GOTREF(__pyx_t_2);
+                __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+                __Pyx_GOTREF(__pyx_t_1);
                 __Pyx_DECREF(__pyx_t_4);
-                __pyx_t_4 = __pyx_t_2;
-                __pyx_t_2 = 0;
-                __pyx_t_2 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-                __Pyx_GOTREF(__pyx_t_2);
-                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+                __pyx_t_4 = __pyx_t_1;
+                __pyx_t_1 = 0;
+                __pyx_t_1 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+                __Pyx_GOTREF(__pyx_t_1);
+                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
               }
               __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
               __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -21270,7 +21016,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
             }
             __pyx_L33:;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1049
+            /* "cvcf.pyx":1049
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l             # <<<<<<<<<<<<<<
@@ -21278,7 +21024,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                         s = a[1:]
  */
             __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_l); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
-            __pyx_t_4 = PySequence_GetSlice(__pyx_v_ref, __pyx_t_8, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+            __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_8, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
             __Pyx_GOTREF(__pyx_t_4);
             __Pyx_DECREF(__pyx_v_a);
             __pyx_v_a = __pyx_t_4;
@@ -21290,12 +21036,12 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           goto __pyx_L32_try_end;
           __pyx_L25_error:;
           __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
           __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
           __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1050
+          /* "cvcf.pyx":1050
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
  *                     except ValueError:             # <<<<<<<<<<<<<<
@@ -21305,25 +21051,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
           if (__pyx_t_11) {
             __Pyx_AddTraceback("cvcf.VCF.validate");
-            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_10, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_10, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
             __Pyx_GOTREF(__pyx_t_4);
             __Pyx_GOTREF(__pyx_t_10);
-            __Pyx_GOTREF(__pyx_t_2);
+            __Pyx_GOTREF(__pyx_t_1);
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1051
+            /* "cvcf.pyx":1051
  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
  *                     except ValueError:
  *                         s = a[1:]             # <<<<<<<<<<<<<<
  *                         if len(ref) < len(s):   # add Ns to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  */
-            __pyx_t_1 = PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-            __Pyx_GOTREF(__pyx_t_1);
+            __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+            __Pyx_GOTREF(__pyx_t_2);
             __Pyx_DECREF(__pyx_v_s);
-            __pyx_v_s = __pyx_t_1;
-            __pyx_t_1 = 0;
+            __pyx_v_s = __pyx_t_2;
+            __pyx_t_2 = 0;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1052
+            /* "cvcf.pyx":1052
  *                     except ValueError:
  *                         s = a[1:]
  *                         if len(ref) < len(s):   # add Ns to reference if necessary             # <<<<<<<<<<<<<<
@@ -21335,15 +21081,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
             __pyx_t_3 = (__pyx_t_8 < __pyx_t_12);
             if (__pyx_t_3) {
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1053
+              /* "cvcf.pyx":1053
  *                         s = a[1:]
  *                         if len(ref) < len(s):   # add Ns to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)             # <<<<<<<<<<<<<<
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  *                                 self.error(str(record),self.V33_UNMATCHED_DELETION,
  */
-              __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-              __Pyx_GOTREF(__pyx_t_1);
+              __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+              __Pyx_GOTREF(__pyx_t_2);
               __pyx_t_12 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
               __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
               __Pyx_GOTREF(__pyx_t_7);
@@ -21359,7 +21105,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
               __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
               __Pyx_GOTREF(__pyx_t_7);
               __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-              __Pyx_GOTREF(__pyx_t_15);
+              __Pyx_GOTREF(((PyObject *)__pyx_t_15));
               __Pyx_INCREF(__pyx_v_chrom);
               PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_chrom);
               __Pyx_GIVEREF(__pyx_v_chrom);
@@ -21372,15 +21118,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
               __pyx_t_13 = 0;
               __pyx_t_14 = 0;
               __pyx_t_7 = 0;
-              __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+              __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
               __Pyx_GOTREF(__pyx_t_7);
-              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+              __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
               __Pyx_DECREF(__pyx_v_addns);
               __pyx_v_addns = __pyx_t_7;
               __pyx_t_7 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1054
+              /* "cvcf.pyx":1054
  *                         if len(ref) < len(s):   # add Ns to reference if necessary
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):             # <<<<<<<<<<<<<<
@@ -21390,56 +21136,56 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
               __pyx_t_7 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__endswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
               __Pyx_GOTREF(__pyx_t_7);
               __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-              __Pyx_GOTREF(__pyx_t_15);
+              __Pyx_GOTREF(((PyObject *)__pyx_t_15));
               __Pyx_INCREF(__pyx_v_addns);
               PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_addns);
               __Pyx_GIVEREF(__pyx_v_addns);
-              __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-              __Pyx_GOTREF(__pyx_t_1);
+              __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+              __Pyx_GOTREF(__pyx_t_2);
               __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-              __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+              __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
+              __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
               __pyx_t_16 = (!__pyx_t_3);
               if (__pyx_t_16) {
                 __pyx_t_12 = PyObject_Length(__pyx_v_addns); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
-                __pyx_t_15 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_GOTREF(__pyx_t_2);
+                __pyx_t_15 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(((PyObject *)__pyx_t_15));
-                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-                __pyx_t_1 = PyObject_RichCompare(__pyx_v_addns, ((PyObject *)__pyx_t_15), Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+                __pyx_t_2 = PyObject_RichCompare(__pyx_v_addns, ((PyObject *)__pyx_t_15), Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_GOTREF(__pyx_t_2);
                 __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-                __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_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 = 1054; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                 __pyx_t_17 = __pyx_t_3;
               } else {
                 __pyx_t_17 = __pyx_t_16;
               }
               if (__pyx_t_17) {
 
-                /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1055
+                /* "cvcf.pyx":1055
  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  *                                 self.error(str(record),self.V33_UNMATCHED_DELETION,             # <<<<<<<<<<<<<<
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  *                             ref += addns
  */
-                __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
+                __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_GOTREF(__pyx_t_2);
                 __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_15);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_15));
                 __Pyx_INCREF(__pyx_v_record);
                 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_record);
                 __Pyx_GIVEREF(__pyx_v_record);
-                __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(__pyx_t_7);
-                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-                __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_65); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
+                __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_111); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(__pyx_t_15);
 
-                /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1056
+                /* "cvcf.pyx":1056
  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
  *                                 self.error(str(record),self.V33_UNMATCHED_DELETION,
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))             # <<<<<<<<<<<<<<
@@ -21457,7 +21203,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
                 __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(__pyx_t_13);
                 __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_19));
                 __Pyx_INCREF(__pyx_v_chrom);
                 PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_chrom);
                 __Pyx_GIVEREF(__pyx_v_chrom);
@@ -21470,23 +21216,23 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
                 __Pyx_GIVEREF(__pyx_t_13);
                 __pyx_t_18 = 0;
                 __pyx_t_13 = 0;
-                __pyx_t_13 = PyObject_Call(__pyx_t_14, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __pyx_t_13 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(__pyx_t_13);
                 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
                 __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_19));
                 __Pyx_INCREF(__pyx_v_a);
                 PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_a);
                 __Pyx_GIVEREF(__pyx_v_a);
                 PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_13);
                 __Pyx_GIVEREF(__pyx_t_13);
                 __pyx_t_13 = 0;
-                __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_66), __pyx_t_19); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_112), ((PyObject *)__pyx_t_19)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(((PyObject *)__pyx_t_13));
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
                 __pyx_t_19 = PyTuple_New(3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
+                __Pyx_GOTREF(((PyObject *)__pyx_t_19));
                 PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_7);
                 __Pyx_GIVEREF(__pyx_t_7);
                 PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_15);
@@ -21496,16 +21242,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
                 __pyx_t_7 = 0;
                 __pyx_t_15 = 0;
                 __pyx_t_13 = 0;
-                __pyx_t_13 = PyObject_Call(__pyx_t_1, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                 __Pyx_GOTREF(__pyx_t_13);
-                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+                __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
                 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                 goto __pyx_L39;
               }
               __pyx_L39:;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1057
+              /* "cvcf.pyx":1057
  *                                 self.error(str(record),self.V33_UNMATCHED_DELETION,
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  *                             ref += addns             # <<<<<<<<<<<<<<
@@ -21518,7 +21264,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
               __pyx_v_ref = __pyx_t_13;
               __pyx_t_13 = 0;
 
-              /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1058
+              /* "cvcf.pyx":1058
  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
@@ -21527,29 +21273,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
               __Pyx_INCREF(__pyx_int_0);
               __pyx_t_13 = __pyx_int_0;
-              if (likely(((PyObject *)__pyx_v_newalts) != Py_None)) {
-                __pyx_t_12 = 0; __pyx_t_19 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_19);
-              } else {
-                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-              }
+              __pyx_t_12 = 0; __pyx_t_19 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_19);
               for (;;) {
                 if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_19)) break;
-                __pyx_t_1 = PyList_GET_ITEM(__pyx_t_19, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++;
+                __pyx_t_2 = PyList_GET_ITEM(__pyx_t_19, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++;
                 __Pyx_DECREF(__pyx_v_na);
-                __pyx_v_na = __pyx_t_1;
-                __pyx_t_1 = 0;
+                __pyx_v_na = __pyx_t_2;
+                __pyx_t_2 = 0;
                 __Pyx_INCREF(__pyx_t_13);
                 __Pyx_DECREF(__pyx_v_i);
                 __pyx_v_i = __pyx_t_13;
-                __pyx_t_1 = PyNumber_Add(__pyx_t_13, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
+                __pyx_t_2 = PyNumber_Add(__pyx_t_13, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_GOTREF(__pyx_t_2);
                 __Pyx_DECREF(__pyx_t_13);
-                __pyx_t_13 = __pyx_t_1;
-                __pyx_t_1 = 0;
-                __pyx_t_1 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
-                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+                __pyx_t_13 = __pyx_t_2;
+                __pyx_t_2 = 0;
+                __pyx_t_2 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_GOTREF(__pyx_t_2);
+                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
               }
               __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
               __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
@@ -21557,7 +21299,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
             }
             __pyx_L38:;
 
-            /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1059
+            /* "cvcf.pyx":1059
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
  *                         a = ref[len(s):]        # new deletion, deleting from pos             # <<<<<<<<<<<<<<
@@ -21565,14 +21307,14 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                     self.error(str(record),self.V33_BAD_ALLELE)
  */
             __pyx_t_12 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
-            __pyx_t_13 = PySequence_GetSlice(__pyx_v_ref, __pyx_t_12, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+            __pyx_t_13 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_12, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
             __Pyx_GOTREF(__pyx_t_13);
             __Pyx_DECREF(__pyx_v_a);
             __pyx_v_a = __pyx_t_13;
             __pyx_t_13 = 0;
             __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
             __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
             goto __pyx_L26_exception_handled;
           }
           __pyx_L27_except_error:;
@@ -21592,42 +21334,42 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1061
+        /* "cvcf.pyx":1061
  *                         a = ref[len(s):]        # new deletion, deleting from pos
  *                 else:
  *                     self.error(str(record),self.V33_BAD_ALLELE)             # <<<<<<<<<<<<<<
  *                 newalts.append(a)
  *             alt = newalts
  */
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
         __Pyx_INCREF(__pyx_v_record);
         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_record);
         __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_ALLELE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_13);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_13));
         PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4);
         __Pyx_GIVEREF(__pyx_t_4);
         PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10);
         __Pyx_GIVEREF(__pyx_t_10);
         __pyx_t_4 = 0;
         __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       }
       __pyx_L24:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1062
+      /* "cvcf.pyx":1062
  *                 else:
  *                     self.error(str(record),self.V33_BAD_ALLELE)
  *                 newalts.append(a)             # <<<<<<<<<<<<<<
@@ -21637,11 +21379,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       if (unlikely(__pyx_v_newalts == Py_None)) {
         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
-      __pyx_t_11 = PyList_Append(((PyObject *)__pyx_v_newalts), __pyx_v_a); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyList_Append(__pyx_v_newalts, __pyx_v_a); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1063
+    /* "cvcf.pyx":1063
  *                     self.error(str(record),self.V33_BAD_ALLELE)
  *                 newalts.append(a)
  *             alt = newalts             # <<<<<<<<<<<<<<
@@ -21652,7 +21394,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __Pyx_DECREF(((PyObject *)__pyx_v_alt));
     __pyx_v_alt = __pyx_v_newalts;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1065
+    /* "cvcf.pyx":1065
  *             alt = newalts
  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
  *             if have_deletions:             # <<<<<<<<<<<<<<
@@ -21661,7 +21403,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
     if (__pyx_v_have_deletions) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1066
+      /* "cvcf.pyx":1066
  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
  *             if have_deletions:
  *                 if pos == 0:             # <<<<<<<<<<<<<<
@@ -21674,7 +21416,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       if (__pyx_t_17) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1068
+        /* "cvcf.pyx":1068
  *                 if pos == 0:
  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)             # <<<<<<<<<<<<<<
@@ -21692,16 +21434,16 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_2 = PyNumber_Add(__pyx_v_pos, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_10); 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);
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_10 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); 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);
         __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
         __Pyx_INCREF(__pyx_v_chrom);
         PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
@@ -21709,46 +21451,45 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __Pyx_GIVEREF(__pyx_t_13);
         PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_10);
         __Pyx_GIVEREF(__pyx_t_10);
-        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
         __pyx_t_13 = 0;
         __pyx_t_10 = 0;
-        __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = 0;
+        __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
         __Pyx_DECREF(__pyx_v_addn);
-        __pyx_v_addn = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_addn = __pyx_t_1;
+        __pyx_t_1 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1069
+        /* "cvcf.pyx":1069
  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
  *                     ref += addn             # <<<<<<<<<<<<<<
  *                     alt = [allele+addn for allele in alt]
  *                 else:
  */
-        __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); 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);
         __Pyx_DECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_ref = __pyx_t_1;
+        __pyx_t_1 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1070
+        /* "cvcf.pyx":1070
  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
  *                     ref += addn
  *                     alt = [allele+addn for allele in alt]             # <<<<<<<<<<<<<<
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  */
-        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-        if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-          __pyx_t_6 = 0; __pyx_t_4 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_4);
-        } else {
-          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+        if (unlikely(__pyx_v_alt == Py_None)) {
+          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
         }
+        __pyx_t_6 = 0; __pyx_t_4 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_4);
         for (;;) {
           if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
           __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
@@ -21757,33 +21498,33 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           __pyx_t_5 = 0;
           __pyx_t_5 = PyNumber_Add(__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_5);
-          if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __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(((PyObject *)__pyx_t_2));
+        __Pyx_INCREF(((PyObject *)__pyx_t_1));
         __Pyx_DECREF(((PyObject *)__pyx_v_alt));
-        __pyx_v_alt = __pyx_t_2;
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+        __pyx_v_alt = __pyx_t_1;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         goto __pyx_L43;
       }
       /*else*/ {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1072
+        /* "cvcf.pyx":1072
  *                     alt = [allele+addn for allele in alt]
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)             # <<<<<<<<<<<<<<
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]
  */
-        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); 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);
         __pyx_t_4 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
         __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
         __Pyx_INCREF(__pyx_v_chrom);
         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
@@ -21796,15 +21537,15 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __Pyx_GIVEREF(__pyx_t_5);
         __pyx_t_4 = 0;
         __pyx_t_5 = 0;
-        __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_v_addn);
         __pyx_v_addn = __pyx_t_5;
         __pyx_t_5 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1073
+        /* "cvcf.pyx":1073
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  *                     ref = addn + ref             # <<<<<<<<<<<<<<
@@ -21817,7 +21558,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_v_ref = __pyx_t_5;
         __pyx_t_5 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1074
+        /* "cvcf.pyx":1074
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]             # <<<<<<<<<<<<<<
@@ -21826,21 +21567,20 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
         __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-        if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-          __pyx_t_6 = 0; __pyx_t_10 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_10);
-        } else {
-          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(__pyx_v_alt == Py_None)) {
+          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
         }
+        __pyx_t_6 = 0; __pyx_t_10 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_10);
         for (;;) {
           if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_10)) break;
-          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
           __Pyx_DECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_2;
-          __pyx_t_2 = 0;
-          __pyx_t_2 = PyNumber_Add(__pyx_v_addn, __pyx_v_allele); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          if (unlikely(PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_v_allele = __pyx_t_1;
+          __pyx_t_1 = 0;
+          __pyx_t_1 = PyNumber_Add(__pyx_v_addn, __pyx_v_allele); 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 (unlikely(PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         }
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __Pyx_INCREF(((PyObject *)__pyx_t_5));
@@ -21848,7 +21588,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_v_alt = __pyx_t_5;
         __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1075
+        /* "cvcf.pyx":1075
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]
  *                     pos -= 1             # <<<<<<<<<<<<<<
@@ -21869,18 +21609,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   }
   /*else*/ {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1078
+    /* "cvcf.pyx":1078
  *         else:
  *             # format v4.0 -- just check for nucleotides
  *             for allele in alt:             # <<<<<<<<<<<<<<
  *                 if not alleleRegEx.match(allele):
  *                     self.error(str(record),self.V40_BAD_ALLELE,allele)
  */
-    if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-      __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-    } else {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_v_alt == Py_None)) {
+      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
+    __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
     for (;;) {
       if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
       __pyx_t_10 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_10); __pyx_t_6++;
@@ -21888,7 +21627,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __pyx_v_allele = __pyx_t_10;
       __pyx_t_10 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1079
+      /* "cvcf.pyx":1079
  *             # format v4.0 -- just check for nucleotides
  *             for allele in alt:
  *                 if not alleleRegEx.match(allele):             # <<<<<<<<<<<<<<
@@ -21897,24 +21636,24 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
       __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__alleleRegEx); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__match); 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);
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
       __Pyx_INCREF(__pyx_v_allele);
       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_allele);
       __Pyx_GIVEREF(__pyx_v_allele);
-      __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __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_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
       __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __pyx_t_16 = (!__pyx_t_17);
       if (__pyx_t_16) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1080
+        /* "cvcf.pyx":1080
  *             for allele in alt:
  *                 if not alleleRegEx.match(allele):
  *                     self.error(str(record),self.V40_BAD_ALLELE,allele)             # <<<<<<<<<<<<<<
@@ -21924,30 +21663,30 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
         __Pyx_INCREF(__pyx_v_record);
         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_record);
         __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); 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);
+        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V40_BAD_ALLELE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_13);
-        PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_13));
+        PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
         PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10);
         __Pyx_GIVEREF(__pyx_t_10);
         __Pyx_INCREF(__pyx_v_allele);
         PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_allele);
         __Pyx_GIVEREF(__pyx_v_allele);
-        __pyx_t_2 = 0;
+        __pyx_t_1 = 0;
         __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         goto __pyx_L50;
       }
@@ -21957,18 +21696,17 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   }
   __pyx_L20:;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1084
+  /* "cvcf.pyx":1084
  * 
  *         # check for leading nucleotide in indel calls
  *         for allele in alt:             # <<<<<<<<<<<<<<
  *             if len(allele) != len(ref):
  *                 if len(allele) == 0: self.error(str(record),self.ZERO_LENGTH_ALLELE)
  */
-  if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-    __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-  } else {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(__pyx_v_alt == Py_None)) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
   }
+  __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
   for (;;) {
     if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
     __pyx_t_10 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_10); __pyx_t_6++;
@@ -21976,7 +21714,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_v_allele = __pyx_t_10;
     __pyx_t_10 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1085
+    /* "cvcf.pyx":1085
  *         # check for leading nucleotide in indel calls
  *         for allele in alt:
  *             if len(allele) != len(ref):             # <<<<<<<<<<<<<<
@@ -21988,7 +21726,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_t_16 = (__pyx_t_12 != __pyx_t_8);
     if (__pyx_t_16) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1086
+      /* "cvcf.pyx":1086
  *         for allele in alt:
  *             if len(allele) != len(ref):
  *                 if len(allele) == 0: self.error(str(record),self.ZERO_LENGTH_ALLELE)             # <<<<<<<<<<<<<<
@@ -22001,33 +21739,33 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_13);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_13));
         __Pyx_INCREF(__pyx_v_record);
         PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_record);
         __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
         __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ZERO_LENGTH_ALLELE); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_13);
-        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
+        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
         __Pyx_GIVEREF(__pyx_t_4);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_13);
+        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_13);
         __Pyx_GIVEREF(__pyx_t_13);
         __pyx_t_4 = 0;
         __pyx_t_13 = 0;
-        __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_13);
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
         goto __pyx_L54;
       }
       __pyx_L54:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1087
+      /* "cvcf.pyx":1087
  *             if len(allele) != len(ref):
  *                 if len(allele) == 0: self.error(str(record),self.ZERO_LENGTH_ALLELE)
  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():             # <<<<<<<<<<<<<<
@@ -22036,41 +21774,41 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
       __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_13);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__upper); 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_t_1 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__upper); 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_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-      __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_13);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_10 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__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_10 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_RichCompare(__pyx_t_13, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_RichCompare(__pyx_t_13, __pyx_t_1, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       if (__pyx_t_16) {
         __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_13 = PyNumber_Add(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__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_13 = PyNumber_Add(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_13);
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__upper); 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;
+        __pyx_t_1 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__upper); 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_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-        __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_13 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_13);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __pyx_t_17 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_13, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
         __pyx_t_3 = __pyx_t_17;
@@ -22079,7 +21817,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       }
       if (__pyx_t_3) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1088
+        /* "cvcf.pyx":1088
  *                 if len(allele) == 0: self.error(str(record),self.ZERO_LENGTH_ALLELE)
  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
  *                     self.error(str(record),self.MISSING_INDEL_ALLELE_REF_BASE)             # <<<<<<<<<<<<<<
@@ -22088,29 +21826,29 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
         __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_13);
-        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
         __Pyx_INCREF(__pyx_v_record);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_record);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record);
         __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_67); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_113); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
         PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10);
         __Pyx_GIVEREF(__pyx_t_10);
-        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
         __pyx_t_10 = 0;
-        __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_Call(__pyx_t_13, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = 0;
+        __pyx_t_1 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         goto __pyx_L55;
       }
       __pyx_L55:;
@@ -22120,7 +21858,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1091
+  /* "cvcf.pyx":1091
  * 
  *         # trim trailing bases in alleles
  *         for i in range(1,min(len(ref),min(map(len,alt)))):             # <<<<<<<<<<<<<<
@@ -22128,70 +21866,70 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                 break
  */
   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
   __Pyx_INCREF(__pyx_builtin_len);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_len);
   __Pyx_GIVEREF(__pyx_builtin_len);
   __Pyx_INCREF(((PyObject *)__pyx_v_alt));
   PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_alt));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_alt));
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_map, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_min, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
   __pyx_t_8 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_LT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_13);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   if (__pyx_t_3) {
-    __Pyx_INCREF(__pyx_t_2);
-    __pyx_t_5 = __pyx_t_2;
+    __Pyx_INCREF(__pyx_t_1);
+    __pyx_t_5 = __pyx_t_1;
   } else {
     __pyx_t_13 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_13);
     __pyx_t_5 = __pyx_t_13;
     __pyx_t_13 = 0;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_int_1);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
   __Pyx_INCREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
   __Pyx_GIVEREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
-    __pyx_t_6 = 0; __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   for (;;) {
-    if (likely(PyList_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
-    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
-      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
+    if (likely(PyList_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
+    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
     } else {
-      __pyx_t_5 = PyIter_Next(__pyx_t_2);
+      __pyx_t_5 = PyIter_Next(__pyx_t_1);
       if (!__pyx_t_5) {
         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
@@ -22202,38 +21940,47 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_v_i = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1092
+    /* "cvcf.pyx":1092
  *         # trim trailing bases in alleles
  *         for i in range(1,min(len(ref),min(map(len,alt)))):
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():             # <<<<<<<<<<<<<<
  *                 break
  *             ref, alt = ref[:-1], [allele[:-1] for allele in alt]
  */
-    __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
+    { /* enter inner scope */
+      PyObject *__pyx_8genexpr1__pyx_v_allele;
+      __pyx_8genexpr1__pyx_v_allele = Py_None; __Pyx_INCREF(Py_None);
+      __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L61_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+      if (unlikely(__pyx_v_alt == Py_None)) {
+        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L61_error;} 
+      }
       __pyx_t_8 = 0; __pyx_t_13 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_13);
-    } else {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    for (;;) {
-      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_13)) break;
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++;
+      for (;;) {
+        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_13)) break;
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++;
+        __Pyx_DECREF(__pyx_8genexpr1__pyx_v_allele);
+        __pyx_8genexpr1__pyx_v_allele = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_allele, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L61_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L61_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L61_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        if (unlikely(PySet_Add(__pyx_t_5, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L61_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
       __Pyx_DECREF(__pyx_8genexpr1__pyx_v_allele);
-      __pyx_8genexpr1__pyx_v_allele = __pyx_t_4;
-      __pyx_t_4 = 0;
-      __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_allele, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      if (unlikely(PySet_Add(__pyx_t_5, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    }
-    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      goto __pyx_L64_exit_scope;
+      __pyx_L61_error:;
+      __Pyx_DECREF(__pyx_8genexpr1__pyx_v_allele);
+      goto __pyx_L1_error;
+      __pyx_L64_exit_scope:;
+    } /* exit inner scope */
     __pyx_t_8 = PySet_Size(((PyObject *)__pyx_t_5)); 
     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __pyx_t_3 = (__pyx_t_8 > 1);
@@ -22269,7 +22016,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     }
     if (__pyx_t_17) {
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1093
+      /* "cvcf.pyx":1093
  *         for i in range(1,min(len(ref),min(map(len,alt)))):
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
  *                 break             # <<<<<<<<<<<<<<
@@ -22281,29 +22028,28 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     }
     __pyx_L58:;
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1094
+    /* "cvcf.pyx":1094
  *             if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
  *                 break
  *             ref, alt = ref[:-1], [allele[:-1] for allele in alt]             # <<<<<<<<<<<<<<
  * 
  *         # left-align alleles, if a reference is available
  */
-    __pyx_t_13 = PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_13 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_13);
     __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-      __pyx_t_8 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-    } else {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__pyx_v_alt == Py_None)) {
+      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     }
+    __pyx_t_8 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
     for (;;) {
       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
       __pyx_t_10 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++;
       __Pyx_DECREF(__pyx_v_allele);
       __pyx_v_allele = __pyx_t_10;
       __pyx_t_10 = 0;
-      __pyx_t_10 = PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
       if (unlikely(PyList_Append(__pyx_t_4, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
@@ -22316,35 +22062,35 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
     __pyx_v_ref = __pyx_t_13;
     __pyx_t_13 = 0;
     __Pyx_DECREF(((PyObject *)__pyx_v_alt));
-    __pyx_v_alt = ((PyObject *)__pyx_t_5);
+    __pyx_v_alt = ((PyObject*)__pyx_t_5);
     __pyx_t_5 = 0;
   }
   __pyx_L57_break:;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1097
+  /* "cvcf.pyx":1097
  * 
  *         # left-align alleles, if a reference is available
  *         if self._leftalign and self._reference:             # <<<<<<<<<<<<<<
  *             while left < pos:
  *                 movable = True
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___leftalign); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___leftalign); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_17) {
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_16 = __pyx_t_3;
   } else {
     __pyx_t_16 = __pyx_t_17;
   }
   if (__pyx_t_16) {
 
-    /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1098
+    /* "cvcf.pyx":1098
  *         # left-align alleles, if a reference is available
  *         if self._leftalign and self._reference:
  *             while left < pos:             # <<<<<<<<<<<<<<
@@ -22352,13 +22098,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                 for allele in alt:
  */
     while (1) {
-      __pyx_t_2 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       if (!__pyx_t_16) break;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1099
+      /* "cvcf.pyx":1099
  *         if self._leftalign and self._reference:
  *             while left < pos:
  *                 movable = True             # <<<<<<<<<<<<<<
@@ -22367,26 +22113,25 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
       __pyx_v_movable = 1;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1100
+      /* "cvcf.pyx":1100
  *             while left < pos:
  *                 movable = True
  *                 for allele in alt:             # <<<<<<<<<<<<<<
  *                     if len(allele) > len(ref):
  *                         longest, shortest = allele, ref
  */
-      if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-        __pyx_t_6 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_2);
-      } else {
-        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(__pyx_v_alt == Py_None)) {
+        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
+      __pyx_t_6 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_1);
       for (;;) {
-        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
-        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
+        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
         __Pyx_DECREF(__pyx_v_allele);
         __pyx_v_allele = __pyx_t_5;
         __pyx_t_5 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1101
+        /* "cvcf.pyx":1101
  *                 movable = True
  *                 for allele in alt:
  *                     if len(allele) > len(ref):             # <<<<<<<<<<<<<<
@@ -22398,7 +22143,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_16 = (__pyx_t_8 > __pyx_t_12);
         if (__pyx_t_16) {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1102
+          /* "cvcf.pyx":1102
  *                 for allele in alt:
  *                     if len(allele) > len(ref):
  *                         longest, shortest = allele, ref             # <<<<<<<<<<<<<<
@@ -22415,11 +22160,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           __Pyx_DECREF(__pyx_v_shortest);
           __pyx_v_shortest = __pyx_t_13;
           __pyx_t_13 = 0;
-          goto __pyx_L68;
+          goto __pyx_L72;
         }
         /*else*/ {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1104
+          /* "cvcf.pyx":1104
  *                         longest, shortest = allele, ref
  *                     else:
  *                         longest, shortest = ref, allele             # <<<<<<<<<<<<<<
@@ -22437,9 +22182,9 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           __pyx_v_shortest = __pyx_t_5;
           __pyx_t_5 = 0;
         }
-        __pyx_L68:;
+        __pyx_L72:;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1105
+        /* "cvcf.pyx":1105
  *                     else:
  *                         longest, shortest = ref, allele
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():             # <<<<<<<<<<<<<<
@@ -22451,7 +22196,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_16 = (__pyx_t_12 == __pyx_t_8);
         if (!__pyx_t_16) {
           __pyx_t_8 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_5 = PySequence_GetSlice(__pyx_v_longest, 0, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_longest, 0, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_5);
           __pyx_t_13 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__upper); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_13);
@@ -22476,7 +22221,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         }
         if (__pyx_t_3) {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1106
+          /* "cvcf.pyx":1106
  *                         longest, shortest = ref, allele
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
  *                         movable = False             # <<<<<<<<<<<<<<
@@ -22484,11 +22229,11 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                         movable = False
  */
           __pyx_v_movable = 0;
-          goto __pyx_L69;
+          goto __pyx_L73;
         }
-        __pyx_L69:;
+        __pyx_L73:;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1107
+        /* "cvcf.pyx":1107
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
  *                         movable = False
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():             # <<<<<<<<<<<<<<
@@ -22521,7 +22266,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         if (__pyx_t_3) {
 
-          /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1108
+          /* "cvcf.pyx":1108
  *                         movable = False
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  *                         movable = False             # <<<<<<<<<<<<<<
@@ -22529,13 +22274,13 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  *                     break
  */
           __pyx_v_movable = 0;
-          goto __pyx_L70;
+          goto __pyx_L74;
         }
-        __pyx_L70:;
+        __pyx_L74:;
       }
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1109
+      /* "cvcf.pyx":1109
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  *                         movable = False
  *                 if not movable:             # <<<<<<<<<<<<<<
@@ -22545,76 +22290,74 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       __pyx_t_3 = (!__pyx_v_movable);
       if (__pyx_t_3) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1110
+        /* "cvcf.pyx":1110
  *                         movable = False
  *                 if not movable:
  *                     break             # <<<<<<<<<<<<<<
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]
  */
-        goto __pyx_L65_break;
-        goto __pyx_L71;
+        goto __pyx_L69_break;
+        goto __pyx_L75;
       }
-      __pyx_L71:;
+      __pyx_L75:;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1111
+      /* "cvcf.pyx":1111
  *                 if not movable:
  *                     break
  *                 ref = ref[:-1]             # <<<<<<<<<<<<<<
  *                 alt = [allele[:-1] for allele in alt]
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  */
-      __pyx_t_2 = PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_v_ref = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1112
+      /* "cvcf.pyx":1112
  *                     break
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]             # <<<<<<<<<<<<<<
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  *                     ref = faref_leftflank[pos-left-1] + ref
  */
-      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-        __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-      } else {
-        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      if (unlikely(__pyx_v_alt == Py_None)) {
+        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
+      __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
       for (;;) {
         if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
         __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
         __Pyx_DECREF(__pyx_v_allele);
         __pyx_v_allele = __pyx_t_4;
         __pyx_t_4 = 0;
-        __pyx_t_4 = PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
-        if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __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_INCREF(((PyObject *)__pyx_t_2));
+      __Pyx_INCREF(((PyObject *)__pyx_t_1));
       __Pyx_DECREF(((PyObject *)__pyx_v_alt));
-      __pyx_v_alt = __pyx_t_2;
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_v_alt = __pyx_t_1;
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-      /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1113
+      /* "cvcf.pyx":1113
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:             # <<<<<<<<<<<<<<
  *                     ref = faref_leftflank[pos-left-1] + ref
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
  */
-      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-        __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-      } else {
-        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      if (unlikely(__pyx_v_alt == Py_None)) {
+        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
+      __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
       for (;;) {
         if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
         __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
@@ -22624,22 +22367,22 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
         __pyx_t_12 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
-        if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __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 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+      __Pyx_INCREF(((PyObject *)__pyx_t_1));
+      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_INCREF(((PyObject *)__pyx_t_2));
-      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_min, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       if (!__pyx_t_3) {
@@ -22651,7 +22394,7 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
       }
       if (__pyx_t_17) {
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1114
+        /* "cvcf.pyx":1114
  *                 alt = [allele[:-1] for allele in alt]
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  *                     ref = faref_leftflank[pos-left-1] + ref             # <<<<<<<<<<<<<<
@@ -22660,33 +22403,32 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
  */
         __pyx_t_5 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __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_GetItem(__pyx_v_faref_leftflank, __pyx_t_2); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_v_ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         __Pyx_DECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __pyx_v_ref = __pyx_t_1;
+        __pyx_t_1 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1115
+        /* "cvcf.pyx":1115
  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
  *                     ref = faref_leftflank[pos-left-1] + ref
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]             # <<<<<<<<<<<<<<
  *                     pos -= 1
  * 
  */
-        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-        if (likely(((PyObject *)__pyx_v_alt) != Py_None)) {
-          __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
-        } else {
-          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+        if (unlikely(__pyx_v_alt == Py_None)) {
+          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
         }
+        __pyx_t_6 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_alt); __Pyx_INCREF(__pyx_t_5);
         for (;;) {
           if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
           __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
@@ -22704,35 +22446,35 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
           __pyx_t_13 = PyNumber_Add(__pyx_t_4, __pyx_v_allele); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_13);
           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-          if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
         }
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __Pyx_INCREF(((PyObject *)__pyx_t_2));
+        __Pyx_INCREF(((PyObject *)__pyx_t_1));
         __Pyx_DECREF(((PyObject *)__pyx_v_alt));
-        __pyx_v_alt = __pyx_t_2;
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+        __pyx_v_alt = __pyx_t_1;
+        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-        /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1116
+        /* "cvcf.pyx":1116
  *                     ref = faref_leftflank[pos-left-1] + ref
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
  *                     pos -= 1             # <<<<<<<<<<<<<<
  * 
  * __all__ = [
  */
-        __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_v_pos);
-        __pyx_v_pos = __pyx_t_2;
-        __pyx_t_2 = 0;
-        goto __pyx_L74;
+        __pyx_v_pos = __pyx_t_1;
+        __pyx_t_1 = 0;
+        goto __pyx_L78;
       }
-      __pyx_L74:;
+      __pyx_L78:;
     }
-    __pyx_L65_break:;
-    goto __pyx_L63;
+    __pyx_L69_break:;
+    goto __pyx_L67;
   }
-  __pyx_L63:;
+  __pyx_L67:;
 
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
@@ -22771,7 +22513,6 @@ static PyObject *__pyx_pf_4cvcf_3VCF_validate(PyObject *__pyx_self, PyObject *__
   __Pyx_DECREF(__pyx_v_allele);
   __Pyx_DECREF(__pyx_v_longest);
   __Pyx_DECREF(__pyx_v_shortest);
-  __Pyx_DECREF(__pyx_8genexpr1__pyx_v_allele);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
@@ -22785,7 +22526,7 @@ static PyObject *__pyx_tp_new_4cvcf_VCFRecord(PyTypeObject *t, PyObject *a, PyOb
   p = ((struct __pyx_obj_4cvcf_VCFRecord *)o);
   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_4cvcf_VCFRecord;
   p->vcf = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pf_4cvcf_9VCFRecord___cinit__(o, a, k) < 0) {
+  if (__pyx_pf_4cvcf_9VCFRecord_1__cinit__(o, a, k) < 0) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -22945,7 +22686,7 @@ static PyNumberMethods __pyx_tp_as_number_VCFRecord = {
 };
 
 static PySequenceMethods __pyx_tp_as_sequence_VCFRecord = {
-  __pyx_pf_4cvcf_9VCFRecord___len__, /*sq_length*/
+  __pyx_pf_4cvcf_9VCFRecord_2__len__, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
   __pyx_sq_item_4cvcf_VCFRecord, /*sq_item*/
@@ -22958,8 +22699,8 @@ static PySequenceMethods __pyx_tp_as_sequence_VCFRecord = {
 };
 
 static PyMappingMethods __pyx_tp_as_mapping_VCFRecord = {
-  __pyx_pf_4cvcf_9VCFRecord___len__, /*mp_length*/
-  __pyx_pf_4cvcf_9VCFRecord___getitem__, /*mp_subscript*/
+  __pyx_pf_4cvcf_9VCFRecord_2__len__, /*mp_length*/
+  __pyx_pf_4cvcf_9VCFRecord_3__getitem__, /*mp_subscript*/
   0, /*mp_ass_subscript*/
 };
 
@@ -22984,7 +22725,7 @@ static PyBufferProcs __pyx_tp_as_buffer_VCFRecord = {
   #endif
 };
 
-PyTypeObject __pyx_type_4cvcf_VCFRecord = {
+static PyTypeObject __pyx_type_4cvcf_VCFRecord = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("cvcf.VCFRecord"), /*tp_name*/
   sizeof(struct __pyx_obj_4cvcf_VCFRecord), /*tp_basicsize*/
@@ -23008,7 +22749,7 @@ PyTypeObject __pyx_type_4cvcf_VCFRecord = {
   0, /*tp_getattro*/
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_VCFRecord, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   __Pyx_DOCSTR("vcf record.\n\n    initialized from data and vcf meta \n    "), /*tp_doc*/
   __pyx_tp_traverse_4cvcf_VCFRecord, /*tp_traverse*/
   __pyx_tp_clear_4cvcf_VCFRecord, /*tp_clear*/
@@ -23181,7 +22922,7 @@ static PyBufferProcs __pyx_tp_as_buffer_asVCFRecord = {
   #endif
 };
 
-PyTypeObject __pyx_type_4cvcf_asVCFRecord = {
+static PyTypeObject __pyx_type_4cvcf_asVCFRecord = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("cvcf.asVCFRecord"), /*tp_name*/
   sizeof(struct __pyx_obj_4cvcf_asVCFRecord), /*tp_basicsize*/
@@ -23200,12 +22941,12 @@ PyTypeObject __pyx_type_4cvcf_asVCFRecord = {
   &__pyx_tp_as_sequence_asVCFRecord, /*tp_as_sequence*/
   &__pyx_tp_as_mapping_asVCFRecord, /*tp_as_mapping*/
   0, /*tp_hash*/
-  __pyx_pf_4cvcf_11asVCFRecord___call__, /*tp_call*/
+  __pyx_pf_4cvcf_11asVCFRecord_1__call__, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_asVCFRecord, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   __Pyx_DOCSTR("converts a :term:`tabix row` into a VCF record."), /*tp_doc*/
   __pyx_tp_traverse_4cvcf_asVCFRecord, /*tp_traverse*/
   __pyx_tp_clear_4cvcf_asVCFRecord, /*tp_clear*/
@@ -23238,8 +22979,6 @@ PyTypeObject __pyx_type_4cvcf_asVCFRecord = {
 };
 
 static PyMethodDef __pyx_methods[] = {
-  {__Pyx_NAMESTR("get_sequence"), (PyCFunction)__pyx_pf_4cvcf_get_sequence, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
-  {__Pyx_NAMESTR("parse_regions"), (PyCFunction)__pyx_pf_4cvcf_parse_regions, METH_O, __Pyx_DOCSTR(0)},
   {0, 0, 0, 0}
 };
 
@@ -23259,124 +22998,107 @@ static struct PyModuleDef __pyx_moduledef = {
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
-  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
-  {&__pyx_kp_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 0},
-  {&__pyx_kp_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 0},
+  {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
   {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
   {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0},
-  {&__pyx_kp_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 0},
-  {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0},
-  {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
-  {&__pyx_kp_u_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 1, 0, 0},
-  {&__pyx_kp_u_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 1, 0, 0},
-  {&__pyx_kp_u_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 1, 0, 0},
-  {&__pyx_n_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 1},
-  {&__pyx_kp_u_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 1, 0, 0},
-  {&__pyx_kp_u_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 1, 0, 0},
-  {&__pyx_kp_u_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 1, 0, 0},
-  {&__pyx_kp_u_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 1, 0, 0},
-  {&__pyx_kp_u_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 1, 0, 0},
-  {&__pyx_kp_u_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 1, 0, 0},
-  {&__pyx_kp_u_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 1, 0, 0},
-  {&__pyx_kp_u_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 1, 0, 0},
-  {&__pyx_kp_u_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 1, 0, 0},
-  {&__pyx_kp_u_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 1, 0, 0},
-  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
-  {&__pyx_kp_u_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 1, 0, 0},
-  {&__pyx_kp_u_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 1, 0, 0},
-  {&__pyx_kp_u_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 1, 0, 0},
-  {&__pyx_kp_u_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 1, 0, 0},
-  {&__pyx_kp_u_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 1, 0, 0},
+  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
+  {&__pyx_n_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 1},
+  {&__pyx_kp_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 0},
+  {&__pyx_n_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 1},
+  {&__pyx_kp_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 0},
+  {&__pyx_n_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 1},
+  {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0},
+  {&__pyx_kp_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 0},
+  {&__pyx_kp_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 0},
+  {&__pyx_kp_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 0},
+  {&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0},
+  {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0},
+  {&__pyx_kp_s_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 1, 0},
+  {&__pyx_kp_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 0},
+  {&__pyx_kp_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 0},
+  {&__pyx_kp_s_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 1, 0},
+  {&__pyx_kp_s_136, __pyx_k_136, sizeof(__pyx_k_136), 0, 0, 1, 0},
+  {&__pyx_kp_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 0},
+  {&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0},
+  {&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
   {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
-  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
-  {&__pyx_n_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 1},
-  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
+  {&__pyx_kp_s_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 1, 0},
+  {&__pyx_kp_s_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 1, 0},
+  {&__pyx_kp_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 0},
+  {&__pyx_kp_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 0},
+  {&__pyx_kp_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 0},
+  {&__pyx_kp_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 0},
+  {&__pyx_kp_s_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 0},
+  {&__pyx_kp_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 0},
+  {&__pyx_kp_s_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 1, 0},
+  {&__pyx_kp_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 0},
+  {&__pyx_kp_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 0},
+  {&__pyx_kp_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 0},
+  {&__pyx_kp_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 0},
+  {&__pyx_kp_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 0},
+  {&__pyx_kp_s_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 0, 1, 0},
+  {&__pyx_kp_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 0},
+  {&__pyx_kp_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0},
+  {&__pyx_kp_s_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 1, 0},
+  {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
+  {&__pyx_kp_s_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 0},
+  {&__pyx_kp_s_160, __pyx_k_160, sizeof(__pyx_k_160), 0, 0, 1, 0},
+  {&__pyx_kp_s_161, __pyx_k_161, sizeof(__pyx_k_161), 0, 0, 1, 0},
+  {&__pyx_kp_s_162, __pyx_k_162, sizeof(__pyx_k_162), 0, 0, 1, 0},
+  {&__pyx_n_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 1},
   {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
   {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
   {&__pyx_n_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 1},
-  {&__pyx_n_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 1},
-  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 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_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
   {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
-  {&__pyx_n_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 1},
   {&__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_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
+  {&__pyx_n_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 1},
   {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
-  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
-  {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
   {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
-  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
-  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
-  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
+  {&__pyx_n_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 1},
+  {&__pyx_n_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 1},
   {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
   {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
   {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
   {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
   {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
-  {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
-  {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0},
-  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
-  {&__pyx_n_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 1},
-  {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0},
-  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
-  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
-  {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0},
-  {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0},
   {&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1},
-  {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
-  {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
-  {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1},
+  {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0},
   {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
   {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0},
-  {&__pyx_n_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 1},
-  {&__pyx_n_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 1},
-  {&__pyx_kp_b_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 0, 0},
+  {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
+  {&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0},
   {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
-  {&__pyx_n_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 1},
-  {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1},
+  {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
+  {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
   {&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0},
-  {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
-  {&__pyx_n_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 1},
   {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
-  {&__pyx_n_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 1},
-  {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
-  {&__pyx_n_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 1},
-  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
+  {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
   {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
   {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
   {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
   {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
-  {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0},
-  {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0},
   {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
   {&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
   {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
-  {&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
+  {&__pyx_n_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 1},
   {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
   {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0},
   {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0},
   {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
-  {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
-  {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
   {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0},
-  {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0},
-  {&__pyx_kp_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 0},
+  {&__pyx_n_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 1},
   {&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0},
   {&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0},
-  {&__pyx_n_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 1},
-  {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0},
+  {&__pyx_kp_b_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 0, 0},
+  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
+  {&__pyx_n_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 1},
   {&__pyx_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0},
   {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0},
-  {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0},
-  {&__pyx_kp_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 0},
-  {&__pyx_kp_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 0},
-  {&__pyx_kp_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 0},
-  {&__pyx_kp_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 0},
-  {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0},
-  {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0},
+  {&__pyx_n_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 1},
+  {&__pyx_n_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 1},
+  {&__pyx_n_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 1},
+  {&__pyx_kp_b__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 0, 0},
   {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
   {&__pyx_n_s__ACGTN, __pyx_k__ACGTN, sizeof(__pyx_k__ACGTN), 0, 0, 1, 1},
   {&__pyx_n_s__ALT, __pyx_k__ALT, sizeof(__pyx_k__ALT), 0, 0, 1, 1},
@@ -23418,6 +23140,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__NT_UNKNOWN, __pyx_k__NT_UNKNOWN, sizeof(__pyx_k__NT_UNKNOWN), 0, 0, 1, 1},
   {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1},
   {&__pyx_n_s__Number, __pyx_k__Number, sizeof(__pyx_k__Number), 0, 0, 1, 1},
+  {&__pyx_n_b__PASS, __pyx_k__PASS, sizeof(__pyx_k__PASS), 0, 0, 0, 1},
   {&__pyx_n_s__PASS, __pyx_k__PASS, sizeof(__pyx_k__PASS), 0, 0, 1, 1},
   {&__pyx_n_s__POS, __pyx_k__POS, sizeof(__pyx_k__POS), 0, 0, 1, 1},
   {&__pyx_n_s__POS_NOT_NUMERICAL, __pyx_k__POS_NOT_NUMERICAL, sizeof(__pyx_k__POS_NOT_NUMERICAL), 0, 0, 1, 1},
@@ -23470,6 +23193,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1},
   {&__pyx_n_s__alt1, __pyx_k__alt1, sizeof(__pyx_k__alt1), 0, 0, 1, 1},
   {&__pyx_n_s__alt2, __pyx_k__alt2, sizeof(__pyx_k__alt2), 0, 0, 1, 1},
+  {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1},
   {&__pyx_n_s__bisect, __pyx_k__bisect, sizeof(__pyx_k__bisect), 0, 0, 1, 1},
   {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1},
   {&__pyx_n_s__chrom, __pyx_k__chrom, sizeof(__pyx_k__chrom), 0, 0, 1, 1},
@@ -23481,6 +23205,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__convertGT, __pyx_k__convertGT, sizeof(__pyx_k__convertGT), 0, 0, 1, 1},
   {&__pyx_n_s__convertGTback, __pyx_k__convertGTback, sizeof(__pyx_k__convertGTback), 0, 0, 1, 1},
   {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
+  {&__pyx_n_s__cvcf, __pyx_k__cvcf, sizeof(__pyx_k__cvcf), 0, 0, 1, 1},
   {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
   {&__pyx_n_s__datagenerator, __pyx_k__datagenerator, sizeof(__pyx_k__datagenerator), 0, 0, 1, 1},
   {&__pyx_n_s__deepcopy, __pyx_k__deepcopy, sizeof(__pyx_k__deepcopy), 0, 0, 1, 1},
@@ -23547,6 +23272,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__parse_formatdata, __pyx_k__parse_formatdata, sizeof(__pyx_k__parse_formatdata), 0, 0, 1, 1},
   {&__pyx_n_s__parse_header, __pyx_k__parse_header, sizeof(__pyx_k__parse_header), 0, 0, 1, 1},
   {&__pyx_n_s__parse_heading, __pyx_k__parse_heading, sizeof(__pyx_k__parse_heading), 0, 0, 1, 1},
+  {&__pyx_n_s__parse_regions, __pyx_k__parse_regions, sizeof(__pyx_k__parse_regions), 0, 0, 1, 1},
   {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
   {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
   {&__pyx_n_s__pos1, __pyx_k__pos1, sizeof(__pyx_k__pos1), 0, 0, 1, 1},
@@ -23615,202 +23341,945 @@ static int __Pyx_InitCachedBuiltins(void) {
   return -1;
 }
 
-static int __Pyx_InitGlobals(void) {
-  #if PY_VERSION_HEX < 0x02040000
-  if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #endif
-  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __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_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_3000000000 = PyInt_FromString((char *)"3000000000", 0, 0); if (unlikely(!__pyx_int_3000000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  return 0;
-  __pyx_L1_error:;
-  return -1;
-}
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
 
-#if PY_MAJOR_VERSION < 3
-PyMODINIT_FUNC initcvcf(void); /*proto*/
-PyMODINIT_FUNC initcvcf(void)
-#else
-PyMODINIT_FUNC PyInit_cvcf(void); /*proto*/
-PyMODINIT_FUNC PyInit_cvcf(void)
-#endif
-{
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  #if CYTHON_REFNANNY
-  void* __pyx_refnanny = NULL;
-  __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");
-  }
-  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_cvcf(void)", __LINE__, __FILE__);
-  #endif
-  __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_binding_PyCFunctionType_USED
-  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #endif
-  /*--- Library function declarations ---*/
-  /*--- Threads initialization code ---*/
-  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
-  #ifdef WITH_THREAD /* Python build with threading support? */
-  PyEval_InitThreads();
-  #endif
-  #endif
-  /*--- Module creation code ---*/
-  #if PY_MAJOR_VERSION < 3
-  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("cvcf"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
-  #else
-  __pyx_m = PyModule_Create(&__pyx_moduledef);
-  #endif
-  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  #if PY_MAJOR_VERSION < 3
-  Py_INCREF(__pyx_m);
-  #endif
-  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
-  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  /*--- Initialize various global constants etc. ---*/
-  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_module_is_main_cvcf) {
-    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  }
-  /*--- Builtin init code ---*/
-  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  /*--- Global init code ---*/
-  /*--- Function export code ---*/
-  /*--- Type init code ---*/
-  __pyx_ptype_10TabProxies_TupleProxy = __Pyx_ImportType("TabProxies", "TupleProxy", sizeof(struct __pyx_obj_10TabProxies_TupleProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_GetVtable(__pyx_ptype_10TabProxies_TupleProxy->tp_dict, &__pyx_vtabptr_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_4cvcf_VCFRecord = &__pyx_vtable_4cvcf_VCFRecord;
-  __pyx_vtable_4cvcf_VCFRecord.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
-  #if PY_MAJOR_VERSION >= 3
-  __pyx_vtable_4cvcf_VCFRecord.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_4cvcf_9VCFRecord_update;
-  #else
-  *(void(**)(void))&__pyx_vtable_4cvcf_VCFRecord.__pyx_base.update = (void(*)(void))__pyx_f_4cvcf_9VCFRecord_update;
-  #endif
-  __pyx_type_4cvcf_VCFRecord.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
-  if (PyType_Ready(&__pyx_type_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_4cvcf_VCFRecord.tp_dict, __pyx_vtabptr_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "VCFRecord", (PyObject *)&__pyx_type_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_4cvcf_VCFRecord = &__pyx_type_4cvcf_VCFRecord;
-  __pyx_ptype_6ctabix_Parser = __Pyx_ImportType("ctabix", "Parser", sizeof(struct __pyx_obj_6ctabix_Parser), 1); if (unlikely(!__pyx_ptype_6ctabix_Parser)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_type_4cvcf_asVCFRecord.tp_base = __pyx_ptype_6ctabix_Parser;
-  if (PyType_Ready(&__pyx_type_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "asVCFRecord", (PyObject *)&__pyx_type_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_4cvcf_asVCFRecord = &__pyx_type_4cvcf_asVCFRecord;
-  /*--- Type import code ---*/
-  __pyx_ptype_6ctabix_Tabixfile = __Pyx_ImportType("ctabix", "Tabixfile", sizeof(struct __pyx_obj_6ctabix_Tabixfile), 1); if (unlikely(!__pyx_ptype_6ctabix_Tabixfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_10TabProxies_GTFProxy = __Pyx_ImportType("TabProxies", "GTFProxy", sizeof(struct __pyx_obj_10TabProxies_GTFProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_GetVtable(__pyx_ptype_10TabProxies_GTFProxy->tp_dict, &__pyx_vtabptr_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_10TabProxies_NamedTupleProxy = __Pyx_ImportType("TabProxies", "NamedTupleProxy", sizeof(struct __pyx_obj_10TabProxies_NamedTupleProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_GetVtable(__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict, &__pyx_vtabptr_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_10TabProxies_BedProxy = __Pyx_ImportType("TabProxies", "BedProxy", sizeof(struct __pyx_obj_10TabProxies_BedProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_GetVtable(__pyx_ptype_10TabProxies_BedProxy->tp_dict, &__pyx_vtabptr_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_10TabProxies_VCFProxy = __Pyx_ImportType("TabProxies", "VCFProxy", sizeof(struct __pyx_obj_10TabProxies_VCFProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_GetVtable(__pyx_ptype_10TabProxies_VCFProxy->tp_dict, &__pyx_vtabptr_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  /*--- Function import code ---*/
-  /*--- Execution code ---*/
+  /* "cvcf.pyx":70
+ * def parse_regions( string ):
+ *     result = []
+ *     for r in string.split(','):             # <<<<<<<<<<<<<<
+ *         elts = r.split(':')
+ *         chrom, start, end = elts[0], 0, 3000000000
+ */
+  __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_3));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":46
- * #
- * 
- * from collections import namedtuple, defaultdict             # <<<<<<<<<<<<<<
- * from operator import itemgetter
- * import sys, re, copy, bisect
+  /* "cvcf.pyx":71
+ *     result = []
+ *     for r in string.split(','):
+ *         elts = r.split(':')             # <<<<<<<<<<<<<<
+ *         chrom, start, end = elts[0], 0, 3000000000
+ *         if len(elts)==1: pass
  */
-  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__namedtuple));
-  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__namedtuple));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__namedtuple));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__defaultdict));
-  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__defaultdict));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__defaultdict));
-  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__namedtuple, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__defaultdict, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":47
- * 
- * from collections import namedtuple, defaultdict
- * from operator import itemgetter             # <<<<<<<<<<<<<<
- * import sys, re, copy, bisect
+  /* "cvcf.pyx":76
+ *         elif len(elts)==2:
+ *             if len(elts[1])>0:
+ *                 ielts = elts[1].split('-')             # <<<<<<<<<<<<<<
+ *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
+ *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
+ */
+  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_7));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
+  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));
+
+  /* "cvcf.pyx":152
+ *             alt = self.fields[4]
+ *             if alt == ".": alt = []
+ *             else: alt = alt.upper().split(',')             # <<<<<<<<<<<<<<
+ *             return alt
  * 
  */
-  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__itemgetter));
-  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__itemgetter));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__itemgetter));
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__itemgetter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itemgetter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_10));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":48
- * from collections import namedtuple, defaultdict
- * from operator import itemgetter
- * import sys, re, copy, bisect             # <<<<<<<<<<<<<<
+  /* "cvcf.pyx":168
+ *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
+ *             if f == b"." or f == b"PASS" or f == b"0": return []
+ *             else: return f.split(';')             # <<<<<<<<<<<<<<
  * 
- * cimport ctabix
+ *     property info:
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_12));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
+
+  /* "cvcf.pyx":176
+ *             info = {}
+ *             if col != b".":
+ *                 for blurp in col.split(';'):             # <<<<<<<<<<<<<<
+ *                     elts = blurp.split('=')
+ *                     if len(elts) == 1: v = None
+ */
+  __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_13));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
+
+  /* "cvcf.pyx":177
+ *             if col != b".":
+ *                 for blurp in col.split(';'):
+ *                     elts = blurp.split('=')             # <<<<<<<<<<<<<<
+ *                     if len(elts) == 1: v = None
+ *                     elif len(elts) == 2: v = elts[1]
+ */
+  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_15));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
+
+  /* "cvcf.pyx":186
+ *     property format:
+ *          def __get__(self):
+ *              return self.fields[8].split(':')             # <<<<<<<<<<<<<<
+ * 
+ *     property samples:
+ */
+  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_16));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
+
+  /* "cvcf.pyx":195
+ * 
+ *         # parse sample columns
+ *         values = self.fields[self.vcf._sample2column[key]].split(':')             # <<<<<<<<<<<<<<
+ *         alt = self.alt
+ *         format = self.format
+ */
+  __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_17));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));
+
+  /* "cvcf.pyx":308
+ *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
+ *         # make error identifiers accessible by name
+ *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id             # <<<<<<<<<<<<<<
+ *         if _copy != None:
+ *             self._leftalign = _copy._leftalign
+ */
+  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_23));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
+
+  /* "cvcf.pyx":329
+ *     def error(self,line,error,opt=None):
+ *         if error in self._ignored_errors: return
+ *         errorlabel, errorstring = self._errors[error].split(':')             # <<<<<<<<<<<<<<
+ *         if opt: errorstring = errorstring % opt
+ *         errwarn = ["Error","Warning"][error in self._warn_errors]
+ */
+  __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_24));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
+
+  /* "cvcf.pyx":338
+ *     def parse_format(self,line,format,filter=False):
+ *         if self._version == 40:
+ *             if not format.startswith('<'):             # <<<<<<<<<<<<<<
+ *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
+ *                 format = "<"+format
+ */
+  __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_28));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_27));
+  PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_27));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
+
+  /* "cvcf.pyx":341
+ *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
+ *                 format = "<"+format
+ *             if not format.endswith('>'):             # <<<<<<<<<<<<<<
+ *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
+ *                 format += ">"
+ */
+  __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_31));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_30));
+  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_30));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
+
+  /* "cvcf.pyx":348
+ *         idx = 0
+ *         while len(format.strip())>0:
+ *             elts = format.strip().split(',')             # <<<<<<<<<<<<<<
+ *             first, rest = elts[0], ','.join(elts[1:])
+ *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
+ */
+  __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
+
+  /* "cvcf.pyx":350
+ *             elts = format.strip().split(',')
+ *             first, rest = elts[0], ','.join(elts[1:])
+ *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):             # <<<<<<<<<<<<<<
+ *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
+ *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
+ */
+  __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_33));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
+  __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_35));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_34));
+  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_34));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
+  __pyx_k_tuple_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_36));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
+  __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_37));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_34));
+  PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_kp_s_34));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));
+
+  /* "cvcf.pyx":354
+ *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
+ *                 first = ["ID=","Number=","Type=","Description="][idx] + first
+ *             if first.startswith('ID='):            data['id'] = first.split('=')[1]             # <<<<<<<<<<<<<<
+ *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
+ *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
+ */
+  __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_44));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
+  PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_40));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
+  __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_45));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
+
+  /* "cvcf.pyx":355
+ *                 first = ["ID=","Number=","Type=","Description="][idx] + first
+ *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
+ *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]             # <<<<<<<<<<<<<<
+ *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
+ *             elif first.startswith('Description='):
+ */
+  __pyx_k_tuple_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_46));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
+  PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_41));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));
+  __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_47));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
+
+  /* "cvcf.pyx":356
+ *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
+ *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
+ *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]             # <<<<<<<<<<<<<<
+ *             elif first.startswith('Description='):
+ *                 elts = format.split('"')
+ */
+  __pyx_k_tuple_48 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_48));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
+  PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_kp_s_42));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));
+  __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_49));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));
+
+  /* "cvcf.pyx":357
+ *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
+ *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
+ *             elif first.startswith('Description='):             # <<<<<<<<<<<<<<
+ *                 elts = format.split('"')
+ *                 if len(elts)<3:
+ */
+  __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_50));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
+  PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_43));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
+
+  /* "cvcf.pyx":358
+ *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
+ *             elif first.startswith('Description='):
+ *                 elts = format.split('"')             # <<<<<<<<<<<<<<
+ *                 if len(elts)<3:
+ *                     self.error(line,self.FORMAT_MISSING_QUOTES)
+ */
+  __pyx_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_51));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_34));
+  PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_kp_s_34));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
+
+  /* "cvcf.pyx":361
+ *                 if len(elts)<3:
+ *                     self.error(line,self.FORMAT_MISSING_QUOTES)
+ *                     elts = first.split('=') + [rest]             # <<<<<<<<<<<<<<
+ *                 data['descr'] = elts[1]
+ *                 rest = '"'.join(elts[2:])
+ */
+  __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_53));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
+
+  /* "cvcf.pyx":364
+ *                 data['descr'] = elts[1]
+ *                 rest = '"'.join(elts[2:])
+ *                 if rest.startswith(','): rest = rest[1:]             # <<<<<<<<<<<<<<
+ *             else:
+ *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
+ */
+  __pyx_k_tuple_54 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_54));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54));
+
+  /* "cvcf.pyx":474
+ *         # snip off trailing missing data
+ *         while len(output) > 1:
+ *             last = output[-1].replace(',','').replace('.','')             # <<<<<<<<<<<<<<
+ *             if len(last)>0: break
+ *             output = output[:-1]
+ */
+  __pyx_k_tuple_67 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_67));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
+  PyTuple_SET_ITEM(__pyx_k_tuple_67, 1, ((PyObject *)__pyx_kp_s_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
+  __pyx_k_tuple_68 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_68));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+  PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_s_9));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
+  PyTuple_SET_ITEM(__pyx_k_tuple_68, 1, ((PyObject *)__pyx_kp_s_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));
+
+  /* "cvcf.pyx":490
+ * 
+ *     def parse_header( self, line ):
+ *         assert line.startswith('##')             # <<<<<<<<<<<<<<
+ *         elts = line[2:].split('=')
+ *         key = elts[0].strip()
+ */
+  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_74));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
+  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_s_73));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
+
+  /* "cvcf.pyx":491
+ *     def parse_header( self, line ):
+ *         assert line.startswith('##')
+ *         elts = line[2:].split('=')             # <<<<<<<<<<<<<<
+ *         key = elts[0].strip()
+ *         value = '='.join(elts[1:]).strip()
+ */
+  __pyx_k_tuple_75 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_75));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
+
+  /* "cvcf.pyx":526
+ * 
+ *     def parse_heading( self, line ):
+ *         assert line.startswith('#')             # <<<<<<<<<<<<<<
+ *         assert not line.startswith('##')
+ *         headings = line[1:].split('\t')
+ */
+  __pyx_k_tuple_83 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_83));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_82));
+  PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)__pyx_kp_s_82));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_82));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
+
+  /* "cvcf.pyx":527
+ *     def parse_heading( self, line ):
+ *         assert line.startswith('#')
+ *         assert not line.startswith('##')             # <<<<<<<<<<<<<<
+ *         headings = line[1:].split('\t')
+ *         if len(headings)==1 and len(line[1:].split()) >= 9:
+ */
+  __pyx_k_tuple_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_84));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
+  PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_kp_s_73));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
+
+  /* "cvcf.pyx":528
+ *         assert line.startswith('#')
+ *         assert not line.startswith('##')
+ *         headings = line[1:].split('\t')             # <<<<<<<<<<<<<<
+ *         if len(headings)==1 and len(line[1:].split()) >= 9:
+ *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
+ */
+  __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_86));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_85));
+  PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_kp_s_85));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_85));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
+
+  /* "cvcf.pyx":581
+ *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
+ *             return []
+ *         values = value.split(',')             # <<<<<<<<<<<<<<
+ *         # deal with trailing data in some early VCF files
+ *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
+ */
+  __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_94));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));
+
+  /* "cvcf.pyx":583
+ *         values = value.split(',')
+ *         # deal with trailing data in some early VCF files
+ *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:             # <<<<<<<<<<<<<<
+ *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
+ *             values[-1] = values[-1].split(';')[0]
+ */
+  __pyx_k_tuple_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_95));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
+
+  /* "cvcf.pyx":585
+ *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
+ *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
+ *             values[-1] = values[-1].split(';')[0]             # <<<<<<<<<<<<<<
+ *         if f.type == "Integer":
+ *             for idx,v in enumerate(values):
+ */
+  __pyx_k_tuple_96 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_96));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
+
+  /* "cvcf.pyx":623
+ * 
+ *     def parse_data( self, line, lineparse=False ):
+ *         cols = line.split('\t')             # <<<<<<<<<<<<<<
+ *         if len(cols) != len(self._samples)+9:
+ *             # gracefully deal with absent FORMAT column
+ */
+  __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_100));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_85));
+  PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_kp_s_85));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_85));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));
+
+  /* "cvcf.pyx":668
+ *         # convert v3.3 to v4.0 alleles below
+ *         if cols[4] == ".": alt = []
+ *         else: alt = cols[4].upper().split(',')             # <<<<<<<<<<<<<<
+ * 
+ *         if cols[5] == ".": qual = -1
+ */
+  __pyx_k_tuple_104 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_104));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+  PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));
+
+  /* "cvcf.pyx":677
+ *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
+ *         if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []
+ *         else: filter = cols[6].split(';')             # <<<<<<<<<<<<<<
+ * 
+ *         # dictionary of keys, and list of values
+ */
+  __pyx_k_tuple_105 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_105));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));
+
+  /* "cvcf.pyx":682
+ *         info = {}
+ *         if cols[7] != ".":
+ *             for blurp in cols[7].split(';'):             # <<<<<<<<<<<<<<
+ *                 elts = blurp.split('=')
+ *                 if len(elts) == 1: v = None
+ */
+  __pyx_k_tuple_106 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_106));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_106, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
+
+  /* "cvcf.pyx":683
+ *         if cols[7] != ".":
+ *             for blurp in cols[7].split(';'):
+ *                 elts = blurp.split('=')             # <<<<<<<<<<<<<<
+ *                 if len(elts) == 1: v = None
+ *                 elif len(elts) == 2: v = elts[1]
+ */
+  __pyx_k_tuple_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_107));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
+  PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
+
+  /* "cvcf.pyx":691
+ *         # Gracefully deal with absent FORMAT column
+ *         if cols[8] == "": format = []
+ *         else: format = cols[8].split(':')             # <<<<<<<<<<<<<<
+ * 
+ *         # check: all filters are defined
+ */
+  __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_108));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
+
+  /* "cvcf.pyx":708
+ *             for a in alt:
+ *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
+ *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference             # <<<<<<<<<<<<<<
+ *                 elif a.startswith('D'): # allow D<seq> and D<num>
+ *                     have_deletions = True
+ */
+  __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_109));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
+  PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_n_s__I));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
+
+  /* "cvcf.pyx":709
+ *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
+ *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
+ *                 elif a.startswith('D'): # allow D<seq> and D<num>             # <<<<<<<<<<<<<<
+ *                     have_deletions = True
+ *                     try:
+ */
+  __pyx_k_tuple_110 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_110));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
+  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_n_s__D));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
+
+  /* "cvcf.pyx":789
+ *         for sample in cols[9:]:
+ *             dict = {}
+ *             values = sample.split(':')             # <<<<<<<<<<<<<<
+ *             if len(values) > len(format):
+ *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
+ */
+  __pyx_k_tuple_114 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_114));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
+  PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));
+
+  /* "cvcf.pyx":855
+ *         for line in stream:
+ *             self._lineno += 1
+ *             if line.startswith('##'):             # <<<<<<<<<<<<<<
+ *                 self.parse_header( line.strip() )
+ *             elif line.startswith('#'):
+ */
+  __pyx_k_tuple_116 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_116));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
+  PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)__pyx_kp_s_73));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));
+
+  /* "cvcf.pyx":857
+ *             if line.startswith('##'):
+ *                 self.parse_header( line.strip() )
+ *             elif line.startswith('#'):             # <<<<<<<<<<<<<<
+ *                 self.parse_heading( line.strip() )
+ *                 self.enter_default_format()
+ */
+  __pyx_k_tuple_117 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_117));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_82));
+  PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_kp_s_82));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_82));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
+
+  /* "cvcf.pyx":921
+ * 
+ *     def setversion(self, version):
+ *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")             # <<<<<<<<<<<<<<
+ *         self._version = version
+ * 
+ */
+  __pyx_k_tuple_120 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_120));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_119));
+  PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_kp_s_119));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_119));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));
+
+  /* "cvcf.pyx":999
+ *         '''
+ * 
+ *         raise NotImplementedError( "needs to be checked" )             # <<<<<<<<<<<<<<
+ * 
+ *         chrom, pos = record.chrom, record.pos
+ */
+  __pyx_k_tuple_123 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_123));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_122));
+  PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_kp_s_122));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_122));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));
+
+  /* "cvcf.pyx":1040
+ *             for a in alt:
+ *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
+ *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference             # <<<<<<<<<<<<<<
+ *                 elif a.startswith('D'): # allow D<seq> and D<num>
+ *                     have_deletions = True
+ */
+  __pyx_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_124));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
+  PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_n_s__I));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
+
+  /* "cvcf.pyx":1041
+ *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
+ *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
+ *                 elif a.startswith('D'): # allow D<seq> and D<num>             # <<<<<<<<<<<<<<
+ *                     have_deletions = True
+ *                     try:
+ */
+  __pyx_k_tuple_125 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_125));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
+  PyTuple_SET_ITEM(__pyx_k_tuple_125, 0, ((PyObject *)__pyx_n_s__D));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
+
+  /* "cvcf.pyx":54
+ * import pysam
+ * 
+ * gtsRegEx = re.compile("[|/\\\\]")             # <<<<<<<<<<<<<<
+ * alleleRegEx = re.compile('^[ACGTN]+$')
+ * 
+ */
+  __pyx_k_tuple_127 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_127));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_126));
+  PyTuple_SET_ITEM(__pyx_k_tuple_127, 0, ((PyObject *)__pyx_kp_s_126));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
+
+  /* "cvcf.pyx":55
+ * 
+ * gtsRegEx = re.compile("[|/\\\\]")
+ * alleleRegEx = re.compile('^[ACGTN]+$')             # <<<<<<<<<<<<<<
+ * 
+ * # Utility function.  Uses 0-based coordinates
+ */
+  __pyx_k_tuple_129 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_129));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_128));
+  PyTuple_SET_ITEM(__pyx_k_tuple_129, 0, ((PyObject *)__pyx_kp_s_128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));
+
+  /* "cvcf.pyx":86
+ * 
+ * 
+ * FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue')             # <<<<<<<<<<<<<<
+ * 
+ * ###########################################################################################################
+ */
+  __pyx_k_tuple_131 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_131));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 0, ((PyObject *)__pyx_n_s__FORMAT));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 1, ((PyObject *)__pyx_kp_s_130));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_130));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
+  __Pyx_RefNannyFinishContext();
+  return 0;
+  __pyx_L1_error:;
+  __Pyx_RefNannyFinishContext();
+  return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+  #if PY_VERSION_HEX < 0x02040000
+  if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __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_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_3000000000 = PyInt_FromString((char *)"3000000000", 0, 0); if (unlikely(!__pyx_int_3000000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initcvcf(void); /*proto*/
+PyMODINIT_FUNC initcvcf(void)
+#else
+PyMODINIT_FUNC PyInit_cvcf(void); /*proto*/
+PyMODINIT_FUNC PyInit_cvcf(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  #if CYTHON_REFNANNY
+  void* __pyx_refnanny = NULL;
+  __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");
+  }
+  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_cvcf(void)", __LINE__, __FILE__);
+  #endif
+  __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_binding_PyCFunctionType_USED
+  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("cvcf"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  #if PY_MAJOR_VERSION < 3
+  Py_INCREF(__pyx_m);
+  #endif
+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
+  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_module_is_main_cvcf) {
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  __pyx_ptype_10TabProxies_TupleProxy = __Pyx_ImportType("TabProxies", "TupleProxy", sizeof(struct __pyx_obj_10TabProxies_TupleProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_10TabProxies_TupleProxy = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_TupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_4cvcf_VCFRecord = &__pyx_vtable_4cvcf_VCFRecord;
+  __pyx_vtable_4cvcf_VCFRecord.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
+  __pyx_vtable_4cvcf_VCFRecord.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_4cvcf_9VCFRecord_update;
+  __pyx_type_4cvcf_VCFRecord.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
+  if (PyType_Ready(&__pyx_type_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_4cvcf_VCFRecord.tp_dict, __pyx_vtabptr_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "VCFRecord", (PyObject *)&__pyx_type_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_4cvcf_VCFRecord = &__pyx_type_4cvcf_VCFRecord;
+  __pyx_ptype_6ctabix_Parser = __Pyx_ImportType("ctabix", "Parser", sizeof(struct __pyx_obj_6ctabix_Parser), 1); if (unlikely(!__pyx_ptype_6ctabix_Parser)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_4cvcf_asVCFRecord.tp_base = __pyx_ptype_6ctabix_Parser;
+  if (PyType_Ready(&__pyx_type_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "asVCFRecord", (PyObject *)&__pyx_type_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_4cvcf_asVCFRecord = &__pyx_type_4cvcf_asVCFRecord;
+  /*--- Type import code ---*/
+  __pyx_ptype_6ctabix_Tabixfile = __Pyx_ImportType("ctabix", "Tabixfile", sizeof(struct __pyx_obj_6ctabix_Tabixfile), 1); if (unlikely(!__pyx_ptype_6ctabix_Tabixfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_10TabProxies_GTFProxy = __Pyx_ImportType("TabProxies", "GTFProxy", sizeof(struct __pyx_obj_10TabProxies_GTFProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_10TabProxies_GTFProxy = (struct __pyx_vtabstruct_10TabProxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_GTFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_10TabProxies_NamedTupleProxy = __Pyx_ImportType("TabProxies", "NamedTupleProxy", sizeof(struct __pyx_obj_10TabProxies_NamedTupleProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_10TabProxies_NamedTupleProxy = (struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_10TabProxies_BedProxy = __Pyx_ImportType("TabProxies", "BedProxy", sizeof(struct __pyx_obj_10TabProxies_BedProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_10TabProxies_BedProxy = (struct __pyx_vtabstruct_10TabProxies_BedProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_BedProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_10TabProxies_VCFProxy = __Pyx_ImportType("TabProxies", "VCFProxy", sizeof(struct __pyx_obj_10TabProxies_VCFProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_10TabProxies_VCFProxy = (struct __pyx_vtabstruct_10TabProxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_VCFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "cvcf.pyx":46
+ * #
+ * 
+ * from collections import namedtuple, defaultdict             # <<<<<<<<<<<<<<
+ * from operator import itemgetter
+ * import sys, re, copy, bisect
+ */
+  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__namedtuple));
+  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__namedtuple));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__namedtuple));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__defaultdict));
+  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__defaultdict));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__defaultdict));
+  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__namedtuple, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__defaultdict, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "cvcf.pyx":47
+ * 
+ * from collections import namedtuple, defaultdict
+ * from operator import itemgetter             # <<<<<<<<<<<<<<
+ * import sys, re, copy, bisect
+ * 
+ */
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__itemgetter));
+  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__itemgetter));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__itemgetter));
+  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__itemgetter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itemgetter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":48
+ * from collections import namedtuple, defaultdict
+ * from operator import itemgetter
+ * import sys, re, copy, bisect             # <<<<<<<<<<<<<<
+ * 
+ * cimport ctabix
+ */
+  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23824,7 +24293,7 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bisect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":52
+  /* "cvcf.pyx":52
  * cimport ctabix
  * cimport TabProxies
  * import pysam             # <<<<<<<<<<<<<<
@@ -23836,7 +24305,7 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pysam, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":54
+  /* "cvcf.pyx":54
  * import pysam
  * 
  * gtsRegEx = re.compile("[|/\\\\]")             # <<<<<<<<<<<<<<
@@ -23848,1261 +24317,966 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_127), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_73));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gtsRegEx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gtsRegEx, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":55
+  /* "cvcf.pyx":55
  * 
  * gtsRegEx = re.compile("[|/\\\\]")
  * alleleRegEx = re.compile('^[ACGTN]+$')             # <<<<<<<<<<<<<<
  * 
  * # Utility function.  Uses 0-based coordinates
  */
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_74));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_74));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_74));
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__alleleRegEx, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_129), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__alleleRegEx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":58
+ * 
+ * # Utility function.  Uses 0-based coordinates
+ * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
+ *     # obtain sequence from .fa file, without truncation
+ *     if end<=start: return ""
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cvcf_get_sequence, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_sequence, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":68
+ * 
+ * # Utility function.  Parses a region string
+ * def parse_regions( string ):             # <<<<<<<<<<<<<<
+ *     result = []
+ *     for r in string.split(','):
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cvcf_1parse_regions, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parse_regions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":86
+  /* "cvcf.pyx":86
  * 
  * 
  * FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue')             # <<<<<<<<<<<<<<
  * 
  * ###########################################################################################################
  */
-  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __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 = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__FORMAT));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_75));
-  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_75));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_75));
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FORMAT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_131), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FORMAT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":232
+  /* "cvcf.pyx":232
  *         return r
  * 
  * class VCF(object):             # <<<<<<<<<<<<<<
  * 
  *     # types
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(__pyx_builtin_object);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_object);
-  __Pyx_GIVEREF(__pyx_builtin_object);
-  __pyx_t_2 = __Pyx_CreateClass(__pyx_t_3, ((PyObject *)__pyx_t_1), __pyx_n_s__VCF, "cvcf"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":235
+  /* "cvcf.pyx":235
  * 
  *     # types
  *     NT_UNKNOWN = 0             # <<<<<<<<<<<<<<
  *     NT_NUMBER = 1
  *     NT_ALLELES = 2
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__NT_UNKNOWN, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_UNKNOWN, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":236
+  /* "cvcf.pyx":236
  *     # types
  *     NT_UNKNOWN = 0
  *     NT_NUMBER = 1             # <<<<<<<<<<<<<<
  *     NT_ALLELES = 2
  *     NT_NR_ALLELES = 3
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__NT_NUMBER, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_NUMBER, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":237
+  /* "cvcf.pyx":237
  *     NT_UNKNOWN = 0
  *     NT_NUMBER = 1
  *     NT_ALLELES = 2             # <<<<<<<<<<<<<<
  *     NT_NR_ALLELES = 3
  *     NT_GENOTYPES = 4
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__NT_ALLELES, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_ALLELES, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":238
+  /* "cvcf.pyx":238
  *     NT_NUMBER = 1
  *     NT_ALLELES = 2
  *     NT_NR_ALLELES = 3             # <<<<<<<<<<<<<<
  *     NT_GENOTYPES = 4
  *     NT_PHASED_GENOTYPES = 5
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__NT_NR_ALLELES, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_NR_ALLELES, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":239
+  /* "cvcf.pyx":239
  *     NT_ALLELES = 2
  *     NT_NR_ALLELES = 3
  *     NT_GENOTYPES = 4             # <<<<<<<<<<<<<<
  *     NT_PHASED_GENOTYPES = 5
  * 
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__NT_GENOTYPES, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_GENOTYPES, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":240
+  /* "cvcf.pyx":240
  *     NT_NR_ALLELES = 3
  *     NT_GENOTYPES = 4
  *     NT_PHASED_GENOTYPES = 5             # <<<<<<<<<<<<<<
  * 
  *     _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier",
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__NT_PHASED_GENOTYPES, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_PHASED_GENOTYPES, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":242
+  /* "cvcf.pyx":242
  *     NT_PHASED_GENOTYPES = 5
  * 
  *     _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier",             # <<<<<<<<<<<<<<
  *                 1:"BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string",
  *                 2:"BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s",
  */
-  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_0, ((PyObject *)__pyx_kp_s_76)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_1, ((PyObject *)__pyx_kp_s_77)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_2, ((PyObject *)__pyx_kp_s_78)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_3, ((PyObject *)__pyx_kp_s_79)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_4, ((PyObject *)__pyx_kp_s_80)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_5, ((PyObject *)__pyx_kp_s_81)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_6, ((PyObject *)__pyx_kp_s_82)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_7, ((PyObject *)__pyx_kp_s_83)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_8, ((PyObject *)__pyx_kp_s_84)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_9, ((PyObject *)__pyx_kp_s_85)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_10, ((PyObject *)__pyx_kp_s_86)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_11, ((PyObject *)__pyx_kp_s_87)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_12, ((PyObject *)__pyx_kp_s_88)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_13, ((PyObject *)__pyx_kp_s_89)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_14, ((PyObject *)__pyx_kp_s_90)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_15, ((PyObject *)__pyx_kp_s_91)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_16, ((PyObject *)__pyx_kp_s_92)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_17, ((PyObject *)__pyx_kp_s_93)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_18, ((PyObject *)__pyx_kp_s_94)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_19, ((PyObject *)__pyx_kp_s_95)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_20, ((PyObject *)__pyx_kp_s_96)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_21, ((PyObject *)__pyx_kp_s_97)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_22, ((PyObject *)__pyx_kp_s_98)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_23, ((PyObject *)__pyx_kp_s_99)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_24, ((PyObject *)__pyx_kp_s_100)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_25, ((PyObject *)__pyx_kp_s_101)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_26, ((PyObject *)__pyx_kp_s_102)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_27, ((PyObject *)__pyx_kp_s_103)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_28, ((PyObject *)__pyx_kp_s_104)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_29, ((PyObject *)__pyx_kp_s_105)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_3, __pyx_int_30, ((PyObject *)__pyx_kp_s_106)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___errors, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, ((PyObject *)__pyx_kp_s_132)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, ((PyObject *)__pyx_kp_s_133)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, ((PyObject *)__pyx_kp_s_134)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, ((PyObject *)__pyx_kp_s_135)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_4, ((PyObject *)__pyx_kp_s_136)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, ((PyObject *)__pyx_kp_s_137)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_6, ((PyObject *)__pyx_kp_s_138)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_7, ((PyObject *)__pyx_kp_s_139)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, ((PyObject *)__pyx_kp_s_140)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_9, ((PyObject *)__pyx_kp_s_141)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_10, ((PyObject *)__pyx_kp_s_142)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_11, ((PyObject *)__pyx_kp_s_143)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_12, ((PyObject *)__pyx_kp_s_144)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_13, ((PyObject *)__pyx_kp_s_145)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_14, ((PyObject *)__pyx_kp_s_146)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_15, ((PyObject *)__pyx_kp_s_147)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_16, ((PyObject *)__pyx_kp_s_148)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_17, ((PyObject *)__pyx_kp_s_149)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_18, ((PyObject *)__pyx_kp_s_150)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_19, ((PyObject *)__pyx_kp_s_151)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_20, ((PyObject *)__pyx_kp_s_152)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_21, ((PyObject *)__pyx_kp_s_153)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_22, ((PyObject *)__pyx_kp_s_154)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_23, ((PyObject *)__pyx_kp_s_155)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_24, ((PyObject *)__pyx_kp_s_156)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_25, ((PyObject *)__pyx_kp_s_157)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_26, ((PyObject *)__pyx_kp_s_158)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_27, ((PyObject *)__pyx_kp_s_159)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_28, ((PyObject *)__pyx_kp_s_160)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_29, ((PyObject *)__pyx_kp_s_161)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_int_30, ((PyObject *)__pyx_kp_s_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___errors, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":276
+  /* "cvcf.pyx":276
  * 
  *     # tag-value pairs; tags are not unique; does not include fileformat, INFO, FILTER or FORMAT fields
  *     _header = []             # <<<<<<<<<<<<<<
  * 
  *     # version number; 33=v3.3; 40=v4.0
  */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___header, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___header, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":279
+  /* "cvcf.pyx":279
  * 
  *     # version number; 33=v3.3; 40=v4.0
  *     _version = 40             # <<<<<<<<<<<<<<
  * 
  *     # info, filter and format data
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":282
+  /* "cvcf.pyx":282
  * 
  *     # info, filter and format data
  *     _info = {}             # <<<<<<<<<<<<<<
  *     _filter = {}
  *     _format = {}
  */
-  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___info, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___info, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":283
+  /* "cvcf.pyx":283
  *     # info, filter and format data
  *     _info = {}
  *     _filter = {}             # <<<<<<<<<<<<<<
  *     _format = {}
  * 
  */
-  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___filter, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___filter, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":284
+  /* "cvcf.pyx":284
  *     _info = {}
  *     _filter = {}
  *     _format = {}             # <<<<<<<<<<<<<<
  * 
  *     # header; and required columns
  */
-  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___format, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___format, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":287
+  /* "cvcf.pyx":287
  * 
  *     # header; and required columns
  *     _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]             # <<<<<<<<<<<<<<
  *     _samples = []
  * 
  */
-  __pyx_t_3 = PyList_New(9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__CHROM));
-  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__CHROM));
+  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__CHROM));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CHROM));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__POS));
-  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__POS));
+  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__POS));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__POS));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__ID));
-  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__ID));
+  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__ID));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__REF));
-  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__REF));
+  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__REF));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__REF));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__ALT));
-  PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__ALT));
+  PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__ALT));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ALT));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__QUAL));
-  PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_n_s__QUAL));
+  PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__QUAL));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__QUAL));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__FILTER));
-  PyList_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_n_s__FILTER));
+  PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__FILTER));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FILTER));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__INFO));
-  PyList_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_n_s__INFO));
+  PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__INFO));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__INFO));
   __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
-  PyList_SET_ITEM(__pyx_t_3, 8, ((PyObject *)__pyx_n_s__FORMAT));
+  PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s__FORMAT));
   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___required, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___required, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":288
+  /* "cvcf.pyx":288
  *     # header; and required columns
  *     _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]
  *     _samples = []             # <<<<<<<<<<<<<<
  * 
  *     # control behaviour
  */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___samples, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___samples, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":291
+  /* "cvcf.pyx":291
  * 
  *     # control behaviour
  *     _ignored_errors = set([11])   # ERROR_UNKNOWN_KEY             # <<<<<<<<<<<<<<
  *     _warn_errors = set([])
  *     _leftalign = False
  */
-  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_int_11);
-  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_11);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_11);
   __Pyx_GIVEREF(__pyx_int_11);
-  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___ignored_errors, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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 = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___ignored_errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":292
+  /* "cvcf.pyx":292
  *     # control behaviour
  *     _ignored_errors = set([11])   # ERROR_UNKNOWN_KEY
  *     _warn_errors = set([])             # <<<<<<<<<<<<<<
  *     _leftalign = False
  * 
  */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___warn_errors, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___warn_errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":293
+  /* "cvcf.pyx":293
  *     _ignored_errors = set([11])   # ERROR_UNKNOWN_KEY
  *     _warn_errors = set([])
  *     _leftalign = False             # <<<<<<<<<<<<<<
  * 
  *     # reference sequence
  */
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___leftalign, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___leftalign, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":296
+  /* "cvcf.pyx":296
  * 
  *     # reference sequence
  *     _reference = None             # <<<<<<<<<<<<<<
  * 
  *     # regions to include; None includes everything
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___reference, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___reference, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":299
+  /* "cvcf.pyx":299
  * 
  *     # regions to include; None includes everything
  *     _regions = None             # <<<<<<<<<<<<<<
  * 
  *     # statefull stuff
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___regions, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___regions, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":302
+  /* "cvcf.pyx":302
  * 
  *     # statefull stuff
  *     _lineno = -1             # <<<<<<<<<<<<<<
  *     _line = None
  *     _lines = None
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___lineno, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___lineno, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":303
+  /* "cvcf.pyx":303
  *     # statefull stuff
  *     _lineno = -1
  *     _line = None             # <<<<<<<<<<<<<<
  *     _lines = None
  * 
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___line, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___line, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":304
+  /* "cvcf.pyx":304
  *     _lineno = -1
  *     _line = None
  *     _lines = None             # <<<<<<<<<<<<<<
  * 
  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
  */
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___lines, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___lines, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":306
+  /* "cvcf.pyx":306
  *     _lines = None
  * 
  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):             # <<<<<<<<<<<<<<
  *         # make error identifiers accessible by name
  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
  */
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_k_13 = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF___init__, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s____init__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_22 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF___init__, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":327
+  /* "cvcf.pyx":327
  *         self._lines = lines
  * 
  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
  *         if error in self._ignored_errors: return
  *         errorlabel, errorstring = self._errors[error].split(':')
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_error, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__error, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_1error, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__error, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":336
+  /* "cvcf.pyx":336
  *         raise ValueError(errorstring)
  * 
  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
  *         if self._version == 40:
  *             if not format.startswith('<'):
  */
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_k_15 = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_parse_format, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__parse_format, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_26 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_2parse_format, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":398
+  /* "cvcf.pyx":398
  * 
  * 
  *     def format_format( self, fmt, filter=False ):             # <<<<<<<<<<<<<<
  *         values = [('ID',fmt.id)]
  *         if fmt.number != None and not filter:
  */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_32 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_format_format, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__format_format, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_60 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_3format_format, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__format_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":418
+  /* "cvcf.pyx":418
  *         return format
  * 
  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
  *         fmt = formatdict[format]
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_get_expected, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__get_expected, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_4get_expected, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__get_expected, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":429
+  /* "cvcf.pyx":429
  * 
  * 
  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
  *         if key in formatdict: return
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF__add_definition, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___add_definition, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_5_add_definition, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___add_definition, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":446
+  /* "cvcf.pyx":446
  * 
  *     # todo: trim trailing missing values
  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):             # <<<<<<<<<<<<<<
  *         output, sdata = [], []
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  */
-  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_k_36 = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_k_37 = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_format_formatdata, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__format_formatdata, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_64 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_65 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_6format_formatdata, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__format_formatdata, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":480
+  /* "cvcf.pyx":480
  * 
  * 
  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_enter_default_format, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s_69, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_7enter_default_format, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_118, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":489
+  /* "cvcf.pyx":489
  *                 self._format[f.id] = f
  * 
  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_parse_header, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__parse_header, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_8parse_header, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":518
+  /* "cvcf.pyx":518
  * 
  * 
  *     def write_header( self, stream ):             # <<<<<<<<<<<<<<
  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_write_header, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__write_header, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_9write_header, NULL, __pyx_n_s__cvcf); 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);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":525
+  /* "cvcf.pyx":525
  * 
  * 
  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
  *         assert line.startswith('#')
  *         assert not line.startswith('##')
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_parse_heading, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__parse_heading, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_10parse_heading, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_heading, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":553
+  /* "cvcf.pyx":553
  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
  * 
  *     def write_heading( self, stream ):             # <<<<<<<<<<<<<<
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
  * 
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_write_heading, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__write_heading, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_11write_heading, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_heading, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":556
+  /* "cvcf.pyx":556
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
  * 
  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
  *         if GTstring == ".": return ["."]
  *         try:
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_convertGT, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__convertGT, __pyx_t_4) < 0) {__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_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_12convertGT, NULL, __pyx_n_s__cvcf); 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 (PyObject_SetItem(__pyx_t_2, __pyx_n_s__convertGT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":569
+  /* "cvcf.pyx":569
  * 
  * 
  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
  *         return ''.join(map(str,GTdata))
  * 
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_convertGTback, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__convertGTback, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_13convertGTback, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__convertGTback, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":572
+  /* "cvcf.pyx":572
  *         return ''.join(map(str,GTdata))
  * 
  *     def parse_formatdata( self, key, value, formatdict, line ):             # <<<<<<<<<<<<<<
  *         # To do: check that the right number of values is present
  *         f = formatdict.get(key,None)
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_parse_formatdata, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__parse_formatdata, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_14parse_formatdata, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_formatdata, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":615
+  /* "cvcf.pyx":615
  * 
  * 
  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
  *         if not self._regions: return True
  *         for r in self._regions:
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_inregion, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__inregion, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_15inregion, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__inregion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":622
+  /* "cvcf.pyx":622
  * 
  * 
  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
  *         cols = line.split('\t')
  *         if len(cols) != len(self._samples)+9:
  */
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_k_61 = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_parse_data, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__parse_data, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_99 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_16parse_data, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_data, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":822
+  /* "cvcf.pyx":822
  * 
  * 
  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
  *         for k in required:
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_write_data, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__write_data, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_17write_data, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_data, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":851
+  /* "cvcf.pyx":851
  *         stream.write( "\t".join(output) + "\n" )
  * 
  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
  *         self._lineno = 0
  *         for line in stream:
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF__parse_header, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___parse_header, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_18_parse_header, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___parse_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":864
+  /* "cvcf.pyx":864
  *         return line
  * 
  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
  *         if len(line.strip()) > 0:
  *             d = self.parse_data( line.strip() )
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF__parse, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s___parse, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_19_parse, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":880
+  /* "cvcf.pyx":880
  *     ######################################################################################################
  * 
  *     def getsamples(self):             # <<<<<<<<<<<<<<
  *         """ List of samples in VCF file """
  *         return self._samples
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_getsamples, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__getsamples, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_20getsamples, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getsamples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":884
+  /* "cvcf.pyx":884
  *         return self._samples
  * 
  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
  *         """ List of samples in VCF file """
  *         self._samples = samples
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setsamples, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setsamples, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_21setsamples, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setsamples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":888
+  /* "cvcf.pyx":888
  *         self._samples = samples
  * 
  *     def getheader(self):             # <<<<<<<<<<<<<<
  *         """ List of header key-value pairs (strings) """
  *         return self._header
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_getheader, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__getheader, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_22getheader, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getheader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":892
+  /* "cvcf.pyx":892
  *         return self._header
  * 
  *     def setheader(self,header):             # <<<<<<<<<<<<<<
  *         """ List of header key-value pairs (strings) """
  *         self._header = header
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setheader, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setheader, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_23setheader, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setheader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":896
+  /* "cvcf.pyx":896
  *         self._header = header
  * 
  *     def getinfo(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         return self._info
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_getinfo, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__getinfo, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_24getinfo, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":900
+  /* "cvcf.pyx":900
  *         return self._info
  * 
  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         self._info = info
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setinfo, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setinfo, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_25setinfo, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":904
+  /* "cvcf.pyx":904
  *         self._info = info
  * 
  *     def getformat(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         return self._format
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_getformat, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__getformat, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_26getformat, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getformat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":908
+  /* "cvcf.pyx":908
  *         return self._format
  * 
  *     def setformat(self,format):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         self._format = format
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setformat, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setformat, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_27setformat, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setformat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":912
+  /* "cvcf.pyx":912
  *         self._format = format
  * 
  *     def getfilter(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         return self._filter
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_getfilter, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__getfilter, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_28getfilter, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getfilter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":916
+  /* "cvcf.pyx":916
  *         return self._filter
  * 
  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         self._filter = filter
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setfilter, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setfilter, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_29setfilter, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setfilter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":920
+  /* "cvcf.pyx":920
  *         self._filter = filter
  * 
  *     def setversion(self, version):             # <<<<<<<<<<<<<<
  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
  *         self._version = version
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setversion, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setversion, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_30setversion, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":924
+  /* "cvcf.pyx":924
  *         self._version = version
  * 
  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
  *         self._regions = regions
  * 
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setregions, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setregions, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_31setregions, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setregions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":927
+  /* "cvcf.pyx":927
  *         self._regions = regions
  * 
  *     def setreference(self, ref):             # <<<<<<<<<<<<<<
  *         """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
  *         self._reference = ref
  */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_setreference, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__setreference, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_32setreference, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setreference, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":931
+  /* "cvcf.pyx":931
  *         self._reference = ref
  * 
  *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
  */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_ignoreerror, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__ignoreerror, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":935
- *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
- * 
- *     def warnerror(self, errorstring):             # <<<<<<<<<<<<<<
- *         try:             self._warn_errors.add(self.__dict__[errorstring])
- *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
- */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_warnerror, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__warnerror, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":939
- *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
- * 
- *     def parse(self, stream):             # <<<<<<<<<<<<<<
- *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
- *         last_line = self._parse_header(stream)
- */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_parse, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__parse, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":946
- *         return self._parse(last_line, stream)
- * 
- *     def write(self, stream, datagenerator):             # <<<<<<<<<<<<<<
- *         """ Writes a VCF file to a stream, using a data generator (or list) """
- *         self.write_header(stream)
- */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_write, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__write, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":952
- *         for data in datagenerator: self.write_data(stream,data)
- * 
- *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
- *         """ Writes a VCF header """
- *         self.write_header(stream)
- */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_writeheader, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__writeheader, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":957
- *         self.write_heading(stream)
- * 
- *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):             # <<<<<<<<<<<<<<
- *         """ Utility function: compares two calls for equality """
- *         # a variant should always be assigned to a unique position, one base before
- */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_compare_calls, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__compare_calls, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":979
- * ###########################################################################################################
- * 
- *     def connect( self, filename ):             # <<<<<<<<<<<<<<
- *         '''connect to tabix file.'''
- *         self.tabixfile = pysam.Tabixfile( filename )
- */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_connect, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__connect, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":984
- *         self._parse_header(self.tabixfile.header)
- * 
- *     def fetch(self,             # <<<<<<<<<<<<<<
- *               reference = None,
- *               start = None,
- */
-  __pyx_t_3 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_fetch, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyMethod_New(__pyx_t_3, 0, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__fetch, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":993
- *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
- * 
- *     def validate( self, record ):             # <<<<<<<<<<<<<<
- *         '''validate vcf record.
- * 
- */
-  __pyx_t_4 = PyCFunction_New(&__pyx_mdef_4cvcf_3VCF_validate, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyMethod_New(__pyx_t_4, 0, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__validate, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VCF, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1118
- *                     pos -= 1
- * 
- * __all__ = [             # <<<<<<<<<<<<<<
- *     "VCF", "VCFRecord", ]
- * 
- */
-  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__VCF));
-  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__VCF));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VCF));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__VCFRecord));
-  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__VCFRecord));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VCFRecord));
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "/ifs/devel/pysam/pysam/pysam/cvcf.pyx":1
- * #             # <<<<<<<<<<<<<<
- * # Code to read, write and edit VCF files
- * #
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__getsamples); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_107), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setsamples); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_108), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__getheader); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_109), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setheader); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_110), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__getinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_111), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_112), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__getformat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_113), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setformat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_114), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__getfilter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_115), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setfilter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_116), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setreference); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_117), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_118), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_119), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__writeheader); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_120), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__compare_calls); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_121), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__connect); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_122), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__fetch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_123), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__validate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_33ignoreerror, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__ignoreerror, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":935
+ *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
+ * 
+ *     def warnerror(self, errorstring):             # <<<<<<<<<<<<<<
+ *         try:             self._warn_errors.add(self.__dict__[errorstring])
+ *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_34warnerror, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__warnerror, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":939
+ *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
+ * 
+ *     def parse(self, stream):             # <<<<<<<<<<<<<<
+ *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
+ *         last_line = self._parse_header(stream)
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_35parse, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":946
+ *         return self._parse(last_line, stream)
+ * 
+ *     def write(self, stream, datagenerator):             # <<<<<<<<<<<<<<
+ *         """ Writes a VCF file to a stream, using a data generator (or list) """
+ *         self.write_header(stream)
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_36write, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":952
+ *         for data in datagenerator: self.write_data(stream,data)
+ * 
+ *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
+ *         """ Writes a VCF header """
+ *         self.write_header(stream)
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_37writeheader, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__writeheader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":957
+ *         self.write_heading(stream)
+ * 
+ *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):             # <<<<<<<<<<<<<<
+ *         """ Utility function: compares two calls for equality """
+ *         # a variant should always be assigned to a unique position, one base before
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_38compare_calls, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__compare_calls, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":979
+ * ###########################################################################################################
+ * 
+ *     def connect( self, filename ):             # <<<<<<<<<<<<<<
+ *         '''connect to tabix file.'''
+ *         self.tabixfile = pysam.Tabixfile( filename )
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_39connect, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__connect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":984
+ *         self._parse_header(self.tabixfile.header)
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference = None,
+ *               start = None,
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_40fetch, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fetch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":993
+ *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
+ * 
+ *     def validate( self, record ):             # <<<<<<<<<<<<<<
+ *         '''validate vcf record.
+ * 
+ */
+  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_4cvcf_3VCF_41validate, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__validate, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "cvcf.pyx":232
+ *         return r
+ * 
+ * class VCF(object):             # <<<<<<<<<<<<<<
+ * 
+ *     # types
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_INCREF(__pyx_builtin_object);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
+  __Pyx_GIVEREF(__pyx_builtin_object);
+  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2), __pyx_n_s__VCF, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_124), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VCF, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+
+  /* "cvcf.pyx":1118
+ *                     pos -= 1
+ * 
+ * __all__ = [             # <<<<<<<<<<<<<<
+ *     "VCF", "VCFRecord", ]
+ * 
+ */
+  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__VCF));
+  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__VCF));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VCF));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__VCFRecord));
+  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__VCFRecord));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VCFRecord));
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+
+  /* "cvcf.pyx":1
+ * #             # <<<<<<<<<<<<<<
+ * # Code to read, write and edit VCF files
+ * #
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pxd":2
+  /* "ctabix.pxd":2
  * 
  * cdef extern from "string.h":             # <<<<<<<<<<<<<<
  *   ctypedef int size_t
@@ -25113,7 +25287,6 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
   if (__pyx_m) {
     __Pyx_AddTraceback("init cvcf");
     Py_DECREF(__pyx_m); __pyx_m = 0;
@@ -25139,19 +25312,6 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
     return result;
 }
 
-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_AS_STRING(kw_name));
-        #endif
-}
-
 static void __Pyx_RaiseArgtupleInvalid(
     const char* func_name,
     int exact,
@@ -25182,6 +25342,19 @@ static void __Pyx_RaiseArgtupleInvalid(
         func_name, more_or_less, num_expected, number, 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_AS_STRING(kw_name));
+        #endif
+}
+
 static int __Pyx_ParseOptionalKeywords(
     PyObject *kwds,
     PyObject **argnames[],
@@ -25262,51 +25435,188 @@ bad:
 }
 
 
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
-    PyObject *local_type, *local_value, *local_tb;
-    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;
-    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
-    if (unlikely(tstate->curexc_type))
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+    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;
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+    if (unlikely(tstate->curexc_type))
+        goto bad;
+    #if PY_MAJOR_VERSION >= 3
+    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+        goto bad;
+    #endif
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+    Py_INCREF(local_type);
+    Py_INCREF(local_value);
+    Py_INCREF(local_tb);
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    /* Make sure tstate is in a consistent state when we XDECREF
+       these objects (XDECREF may run arbitrary code). */
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+    return 0;
+bad:
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
+}
+
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+    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);
+}
+
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+    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;
+}
+
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    Py_XINCREF(type);
+    Py_XINCREF(value);
+    Py_XINCREF(tb);
+    /* First, check the traceback argument, replacing None with NULL. */
+    if (tb == Py_None) {
+        Py_DECREF(tb);
+        tb = 0;
+    }
+    else if (tb != NULL && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto raise_error;
+    }
+    /* Next, replace a missing value with None */
+    if (value == NULL) {
+        value = Py_None;
+        Py_INCREF(value);
+    }
+    #if PY_VERSION_HEX < 0x02050000
+    if (!PyClass_Check(type))
+    #else
+    if (!PyType_Check(type))
+    #endif
+    {
+        /* Raising an instance.  The value should be a dummy. */
+        if (value != Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        /* Normalize to raise <class>, <instance> */
+        Py_DECREF(value);
+        value = type;
+        #if PY_VERSION_HEX < 0x02050000
+            if (PyInstance_Check(type)) {
+                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+                Py_INCREF(type);
+            }
+            else {
+                type = 0;
+                PyErr_SetString(PyExc_TypeError,
+                    "raise: exception must be an old-style class or instance");
+                goto raise_error;
+            }
+        #else
+            type = (PyObject*) Py_TYPE(type);
+            Py_INCREF(type);
+            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+                PyErr_SetString(PyExc_TypeError,
+                    "raise: exception class must be a subclass of BaseException");
+                goto raise_error;
+            }
+        #endif
+    }
+
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+
+#else /* Python 3+ */
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    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 PY_MAJOR_VERSION >= 3
-    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+    }
+    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)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
         goto bad;
-    #endif
-    *type = local_type;
-    *value = local_value;
-    *tb = local_tb;
-    Py_INCREF(local_type);
-    Py_INCREF(local_value);
-    Py_INCREF(local_tb);
-    tmp_type = tstate->exc_type;
-    tmp_value = tstate->exc_value;
-    tmp_tb = tstate->exc_traceback;
-    tstate->exc_type = local_type;
-    tstate->exc_value = local_value;
-    tstate->exc_traceback = local_tb;
-    /* Make sure tstate is in a consistent state when we XDECREF
-       these objects (XDECREF may run arbitrary code). */
-    Py_XDECREF(tmp_type);
-    Py_XDECREF(tmp_value);
-    Py_XDECREF(tmp_tb);
-    return 0;
+    }
+
+    PyErr_SetObject(type, value);
+
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+
 bad:
-    *type = 0;
-    *value = 0;
-    *tb = 0;
-    Py_XDECREF(local_type);
-    Py_XDECREF(local_value);
-    Py_XDECREF(local_tb);
-    return -1;
+    return;
 }
-
+#endif
 
 static double __Pyx__PyObject_AsDouble(PyObject* obj) {
     PyObject* float_value;
@@ -25446,167 +25756,91 @@ bad:
     return module;
 }
 
-static PyObject *__Pyx_CreateClass(
-    PyObject *bases, PyObject *dict, PyObject *name, const char *modname)
-{
-    PyObject *py_modname;
-    PyObject *result = 0;
-
-    #if PY_MAJOR_VERSION < 3
-    py_modname = PyString_FromString(modname);
-    #else
-    py_modname = PyUnicode_FromString(modname);
-    #endif
-    if (!py_modname)
-        goto bad;
-    if (PyDict_SetItemString(dict, "__module__", py_modname) < 0)
-        goto bad;
-    #if PY_MAJOR_VERSION < 3
-    result = PyClass_New(bases, dict, name);
-    #else
-    result = PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, dict, NULL);
-    #endif
-bad:
-    Py_XDECREF(py_modname);
-    return result;
-}
-
-static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
-    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);
+static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
+    PyObject *metaclass;
+    /* Default metaclass */
+#if PY_MAJOR_VERSION < 3
+    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
+        PyObject *base = PyTuple_GET_ITEM(bases, 0);
+        metaclass = PyObject_GetAttrString(base, "__class__");
+        if (!metaclass) {
+            PyErr_Clear();
+            metaclass = (PyObject*) Py_TYPE(base);
+        }
+    } else {
+        metaclass = (PyObject *) &PyClass_Type;
+    }
+#else
+    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
+        PyObject *base = PyTuple_GET_ITEM(bases, 0);
+        metaclass = (PyObject*) Py_TYPE(base);
+    } else {
+        metaclass = (PyObject *) &PyType_Type;
+    }
+#endif
+    Py_INCREF(metaclass);
+    return metaclass;
 }
 
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
-    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;
-}
+static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
+                                   PyObject *modname) {
+    PyObject *result;
+    PyObject *metaclass;
 
+    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
+        return NULL;
 
-#if PY_MAJOR_VERSION < 3
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
-    Py_XINCREF(type);
-    Py_XINCREF(value);
-    Py_XINCREF(tb);
-    /* First, check the traceback argument, replacing None with NULL. */
-    if (tb == Py_None) {
-        Py_DECREF(tb);
-        tb = 0;
-    }
-    else if (tb != NULL && !PyTraceBack_Check(tb)) {
-        PyErr_SetString(PyExc_TypeError,
-            "raise: arg 3 must be a traceback or None");
-        goto raise_error;
-    }
-    /* Next, replace a missing value with None */
-    if (value == NULL) {
-        value = Py_None;
-        Py_INCREF(value);
-    }
-    #if PY_VERSION_HEX < 0x02050000
-    if (!PyClass_Check(type))
-    #else
-    if (!PyType_Check(type))
-    #endif
-    {
-        /* Raising an instance.  The value should be a dummy. */
-        if (value != Py_None) {
-            PyErr_SetString(PyExc_TypeError,
-                "instance exception may not have a separate value");
-            goto raise_error;
-        }
-        /* Normalize to raise <class>, <instance> */
-        Py_DECREF(value);
-        value = type;
-        #if PY_VERSION_HEX < 0x02050000
-            if (PyInstance_Check(type)) {
-                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
-                Py_INCREF(type);
-            }
-            else {
-                type = 0;
-                PyErr_SetString(PyExc_TypeError,
-                    "raise: exception must be an old-style class or instance");
-                goto raise_error;
-            }
-        #else
-            type = (PyObject*) Py_TYPE(type);
-            Py_INCREF(type);
-            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
-                PyErr_SetString(PyExc_TypeError,
-                    "raise: exception class must be a subclass of BaseException");
-                goto raise_error;
-            }
-        #endif
+    /* Python2 __metaclass__ */
+    metaclass = PyDict_GetItemString(dict, "__metaclass__");
+    if (metaclass) {
+        Py_INCREF(metaclass);
+    } else {
+        metaclass = __Pyx_FindPy2Metaclass(bases);
     }
-
-    __Pyx_ErrRestore(type, value, tb);
-    return;
-raise_error:
-    Py_XDECREF(value);
-    Py_XDECREF(type);
-    Py_XDECREF(tb);
-    return;
+    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
+    Py_DECREF(metaclass);
+    return result;
 }
 
-#else /* Python 3+ */
 
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
-    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;
+static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) {
+       __pyx_binding_PyCFunctionType_object *op = PyObject_GC_New(__pyx_binding_PyCFunctionType_object, __pyx_binding_PyCFunctionType);
+    if (op == NULL)
+        return NULL;
+       op->func.m_ml = ml;
+       Py_XINCREF(self);
+       op->func.m_self = self;
+       Py_XINCREF(module);
+       op->func.m_module = module;
+       PyObject_GC_Track(op);
+       return (PyObject *)op;
+}
 
-    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)) {
-        PyErr_SetString(PyExc_TypeError,
-            "raise: exception class must be a subclass of BaseException");
-        goto bad;
-    }
+static void __pyx_binding_PyCFunctionType_dealloc(__pyx_binding_PyCFunctionType_object *m) {
+       PyObject_GC_UnTrack(m);
+       Py_XDECREF(m->func.m_self);
+       Py_XDECREF(m->func.m_module);
+    PyObject_GC_Del(m);
+}
 
-    PyErr_SetObject(type, value);
+static PyObject *__pyx_binding_PyCFunctionType_descr_get(PyObject *func, PyObject *obj, PyObject *type) {
+       if (obj == Py_None)
+               obj = NULL;
+       return PyMethod_New(func, obj, type);
+}
 
-    if (tb) {
-        PyThreadState *tstate = PyThreadState_GET();
-        PyObject* tmp_tb = tstate->curexc_traceback;
-        if (tb != tmp_tb) {
-            Py_INCREF(tb);
-            tstate->curexc_traceback = tb;
-            Py_XDECREF(tmp_tb);
-        }
+static int __pyx_binding_PyCFunctionType_init(void) {
+    __pyx_binding_PyCFunctionType_type = PyCFunction_Type;
+    __pyx_binding_PyCFunctionType_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method");
+    __pyx_binding_PyCFunctionType_type.tp_dealloc = (destructor)__pyx_binding_PyCFunctionType_dealloc;
+    __pyx_binding_PyCFunctionType_type.tp_descr_get = __pyx_binding_PyCFunctionType_descr_get;
+    if (PyType_Ready(&__pyx_binding_PyCFunctionType_type) < 0) {
+        return -1;
     }
+    __pyx_binding_PyCFunctionType = &__pyx_binding_PyCFunctionType_type;
+    return 0;
 
-bad:
-    return;
 }
-#endif
 
 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) {
     const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
@@ -26061,13 +26295,13 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
     if (!result)
         goto bad;
     if (!PyType_Check(result)) {
-        PyErr_Format(PyExc_TypeError, 
+        PyErr_Format(PyExc_TypeError,
             "%s.%s is not a type object",
             module_name, class_name);
         goto bad;
     }
     if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
-        PyOS_snprintf(warning, sizeof(warning), 
+        PyOS_snprintf(warning, sizeof(warning),
             "%s.%s size changed, may indicate binary incompatibility",
             module_name, class_name);
         #if PY_VERSION_HEX < 0x02050000
@@ -26077,7 +26311,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
         #endif
     }
     else if (((PyTypeObject *)result)->tp_basicsize != size) {
-        PyErr_Format(PyExc_ValueError, 
+        PyErr_Format(PyExc_ValueError,
             "%s.%s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
@@ -26112,22 +26346,23 @@ bad:
 }
 #endif
 
-static int __Pyx_GetVtable(PyObject *dict, void *vtabptr) {
+static void* __Pyx_GetVtable(PyObject *dict) {
+    void* ptr;
     PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
     if (!ob)
         goto bad;
 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
-    *(void **)vtabptr = PyCapsule_GetPointer(ob, 0);
+    ptr = PyCapsule_GetPointer(ob, 0);
 #else
-    *(void **)vtabptr = PyCObject_AsVoidPtr(ob);
+    ptr = PyCObject_AsVoidPtr(ob);
 #endif
-    if (!*(void **)vtabptr)
-        goto bad;
+    if (!ptr && !PyErr_Occurred())
+        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
     Py_DECREF(ob);
-    return 0;
+    return ptr;
 bad:
     Py_XDECREF(ob);
-    return -1;
+    return NULL;
 }
 
 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
index c9d4543eea72bd3aa193dfff3c7c0f9f5edfac91..e0456901cf493b0f78e4e3c8f93478bab0a02383 100644 (file)
@@ -27,7 +27,9 @@ FILE * pysam_set_stderr( FILE * f )
 // taken from bam_index.c
 // The order of the following declarations is important.
 // #######################################################
+#define BAM_MAX_BIN 37450 // =(8^6-1)/7+1
 
+// initialize hashes
 typedef struct
 {
   uint64_t u, v;
@@ -35,6 +37,8 @@ typedef struct
 
 #define pair64_lt(a,b) ((a).u < (b).u)
 
+KSORT_INIT(myoff, pair64_t, pair64_lt);
+
 typedef struct {
        uint32_t m, n;
        pair64_t *list;
@@ -45,14 +49,16 @@ typedef struct {
        uint64_t *offset;
 } bam_lidx_t;
 
-KSORT_INIT(my_off, pair64_t, pair64_lt);
-KHASH_MAP_INIT_INT(my_i, bam_binlist_t);
+
+// initialize hashes ('i' and 's' are idenditifiers)
+KHASH_MAP_INIT_INT(i, bam_binlist_t);
 KHASH_MAP_INIT_STR(s, int)
 
 struct __bam_index_t
 {
   int32_t n;
-  khash_t(my_i) **index;
+  uint64_t n_no_coor; // unmapped reads without coordinate
+  khash_t(i) **index;
   bam_lidx_t *index2;
 };
 
@@ -77,7 +83,7 @@ struct __bam_plbuf_t {
        bam_pileup1_t *pu;
        int flag_mask;
 };
-
+  
 static mempool_t *mp_init()
 {
        mempool_t *mp;
@@ -187,50 +193,88 @@ typedef struct __bmc_aux_t {
        errmod_t *em;
 } bmc_aux_t;
 
-uint32_t pysam_glf_depth( glf1_t * g )
+// Return number of mapped reads on tid.
+// If tid < 0, return mapped reads without a coordinate (0)
+uint32_t pysam_get_mapped( const bam_index_t *idx, const int tid )
 {
-  return g->depth;
-}
-
 
-void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c )
-{
-  int x = 0;
-  fprintf(stderr,
-         "glf: ref_base=%i, max_mapQ=%i, min_lk=%i, depth=%i",
-         g->ref_base,
-         g->max_mapQ,
-         g->min_lk,
-         g->depth );
-
-  for (x = 0; x < 10; ++x) 
-    fprintf(stderr, ", lk%x=%i, ", x, g->lk[x]);
-
-  fprintf(stderr,
-         "maqcns: het_rate=%f, theta=%f, n_hap=%i, cap_mapQ=%i, errmod=%i, min_baseQ=%i, eta=%f, q_r=%f, aux_max=%i",
-         c->het_rate,
-         c->theta,
-         c->n_hap,
-         c->cap_mapQ,
-         c->errmod,
-         c->min_baseQ,
-         c->eta,
-         c->q_r,
-         c->aux->max);
-  
-  for (x = 0; x < c->aux->max; ++x)
+  if (tid >= 0)
     {
-      fprintf(stderr, ", info-%i=%i ", x, c->aux->info[x]);
-      if (c->aux->info[x] == 0) break;
+      khint_t k;
+      khash_t(i) *h = idx->index[tid];
+      k = kh_get(i, h, BAM_MAX_BIN);
+
+      if (k != kh_end(h))
+       return kh_val(h, k).list[1].u;
+      else
+       return 0;
     }
-  
-  for (x = 0; x < c->aux->max; ++x)
+
+  return 0;
+}
+
+uint32_t pysam_get_unmapped( const bam_index_t *idx, const int tid )
+{
+
+  if (tid >= 0)
     {
-      fprintf(stderr, ", info16-%i=%i ", x, c->aux->info16[x]);
-      if (c->aux->info16[x] == 0) break;
+      khint_t k;
+      khash_t(i) *h = idx->index[tid];
+      k = kh_get(i, h, BAM_MAX_BIN);
+
+      if (k != kh_end(h))
+       return kh_val(h, k).list[1].v;
+      else
+       return 0;
     }
+
+  return idx->n_no_coor;
 }
 
+/* uint32_t pysam_glf_depth( glf1_t * g ) */
+/* { */
+/*   return g->depth; */
+/* } */
+
+
+/* void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c ) */
+/* { */
+/*   int x = 0; */
+/*   fprintf(stderr, */
+/*       "glf: ref_base=%i, max_mapQ=%i, min_lk=%i, depth=%i", */
+/*       g->ref_base, */
+/*       g->max_mapQ, */
+/*       g->min_lk, */
+/*       g->depth ); */
+
+/*   for (x = 0; x < 10; ++x)  */
+/*     fprintf(stderr, ", lk%x=%i, ", x, g->lk[x]); */
+
+/*   fprintf(stderr, */
+/*       "maqcns: het_rate=%f, theta=%f, n_hap=%i, cap_mapQ=%i, errmod=%i, min_baseQ=%i, eta=%f, q_r=%f, aux_max=%i", */
+/*       c->het_rate, */
+/*       c->theta, */
+/*       c->n_hap, */
+/*       c->cap_mapQ, */
+/*       c->errmod, */
+/*       c->min_baseQ, */
+/*       c->eta, */
+/*       c->q_r, */
+/*       c->aux->max); */
+  
+/*   for (x = 0; x < c->aux->max; ++x) */
+/*     { */
+/*       fprintf(stderr, ", info-%i=%i ", x, c->aux->info[x]); */
+/*       if (c->aux->info[x] == 0) break; */
+/*     } */
+  
+/*   for (x = 0; x < c->aux->max; ++x) */
+/*     { */
+/*       fprintf(stderr, ", info16-%i=%i ", x, c->aux->info16[x]); */
+/*       if (c->aux->info16[x] == 0) break; */
+/*     } */
+/* } */
+
 
   
 
@@ -238,18 +282,26 @@ void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c )
 // command line within python.
 // taken from the main function in bamtk.c
 // added code to reset getopt
-extern int main_samview(int argc, char *argv[]);
-extern int main_import(int argc, char *argv[]);
-extern int bam_pileup(int argc, char *argv[]);
-extern int bam_merge(int argc, char *argv[]);
-extern int bam_sort(int argc, char *argv[]);
-extern int bam_index(int argc, char *argv[]);
-extern int faidx_main(int argc, char *argv[]);
-extern int bam_mating(int argc, char *argv[]);
-extern int bam_rmdup(int argc, char *argv[]);
-extern int glf3_view_main(int argc, char *argv[]);
-extern int bam_flagstat(int argc, char *argv[]);
-extern int bam_fillmd(int argc, char *argv[]);
+int bam_taf2baf(int argc, char *argv[]);
+int bam_mpileup(int argc, char *argv[]);
+int bam_merge(int argc, char *argv[]);
+int bam_index(int argc, char *argv[]);
+int bam_sort(int argc, char *argv[]);
+int bam_tview_main(int argc, char *argv[]);
+int bam_mating(int argc, char *argv[]);
+int bam_rmdup(int argc, char *argv[]);
+int bam_flagstat(int argc, char *argv[]);
+int bam_fillmd(int argc, char *argv[]);
+int bam_idxstats(int argc, char *argv[]);
+int main_samview(int argc, char *argv[]);
+int main_import(int argc, char *argv[]);
+int main_reheader(int argc, char *argv[]);
+int main_cut_target(int argc, char *argv[]);
+int main_phase(int argc, char *argv[]);
+int main_cat(int argc, char *argv[]);
+int main_depth(int argc, char *argv[]);
+int main_bam2fq(int argc, char *argv[]);
+int faidx_main(int argc, char *argv[]);
 
 int pysam_dispatch(int argc, char *argv[] )
 {
@@ -262,25 +314,31 @@ int pysam_dispatch(int argc, char *argv[] )
 #endif
 #endif
   
-  // reset getop
+  // reset getopt
   optind = 1;
 
   if (argc < 2) return 1;
 
   if (strcmp(argv[1], "view") == 0) return main_samview(argc-1, argv+1);
   else if (strcmp(argv[1], "import") == 0) return main_import(argc-1, argv+1);
-  else if (strcmp(argv[1], "pileup") == 0) return bam_pileup(argc-1, argv+1);
+  else if (strcmp(argv[1], "mpileup") == 0) return bam_mpileup(argc-1, argv+1);
   else if (strcmp(argv[1], "merge") == 0) return bam_merge(argc-1, argv+1);
   else if (strcmp(argv[1], "sort") == 0) return bam_sort(argc-1, argv+1);
-  else if (strcmp(argv[1], "index") == 0) return bam_index(argc-1, argv+1); 
+  else if (strcmp(argv[1], "index") == 0) return bam_index(argc-1, argv+1);
   else if (strcmp(argv[1], "faidx") == 0) return faidx_main(argc-1, argv+1);
+  else if (strcmp(argv[1], "idxstats") == 0) return bam_idxstats(argc-1, argv+1);
   else if (strcmp(argv[1], "fixmate") == 0) return bam_mating(argc-1, argv+1);
   else if (strcmp(argv[1], "rmdup") == 0) return bam_rmdup(argc-1, argv+1);
-  else if (strcmp(argv[1], "glfview") == 0) return glf3_view_main(argc-1, argv+1);
   else if (strcmp(argv[1], "flagstat") == 0) return bam_flagstat(argc-1, argv+1);
   else if (strcmp(argv[1], "calmd") == 0) return bam_fillmd(argc-1, argv+1);
   else if (strcmp(argv[1], "fillmd") == 0) return bam_fillmd(argc-1, argv+1);
-
+  else if (strcmp(argv[1], "reheader") == 0) return main_reheader(argc-1, argv+1);
+  else if (strcmp(argv[1], "cat") == 0) return main_cat(argc-1, argv+1);
+  else if (strcmp(argv[1], "targetcut") == 0) return main_cut_target(argc-1, argv+1);
+  else if (strcmp(argv[1], "phase") == 0) return main_phase(argc-1, argv+1);
+  else if (strcmp(argv[1], "depth") == 0) return main_depth(argc-1, argv+1);
+  else if (strcmp(argv[1], "bam2fq") == 0) return main_bam2fq(argc-1, argv+1);
+  
 #if _CURSES_LIB != 0
   else if (strcmp(argv[1], "tview") == 0) return bam_tview_main(argc-1, argv+1);
 #endif
index 89e381bbd8fee3762d56a1d7dad14b9c44f6b8a2..c6184eb756cca0241dc06449b829f4198ebef02a 100644 (file)
@@ -48,12 +48,18 @@ extern unsigned char bam_nt16_table[256];
 // translate a reference string *s* to a tid
 int pysam_reference2tid( bam_header_t *header, const char * s );
 
+// return number of mapped reads for tid
+uint32_t pysam_get_mapped( const bam_index_t *idx, const int tid );
+
+// return number of unmapped reads for tid
+uint32_t pysam_get_unmapped( const bam_index_t *idx, const int tid );
+
 // debugging functions
-#include "glf.h"
-uint32_t pysam_glf_depth( glf1_t * g);
+/* #include "glf.h" */
+/* uint32_t pysam_glf_depth( glf1_t * g); */
 
-#include "bam_maqcns.h"
-void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c );
+/* #include "bam_maqcns.h" */
+/* void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c ); */
 
 
 #endif
index 34937f454fc74fddbb2e45de4b851ebac731a3d1..c0ce4ad44e13a632f96e4c72a2ee7a5b3a951776 100644 (file)
@@ -1,7 +1,7 @@
 # pysam versioning information
 
-__version__ = "0.5"
+__version__ = "0.6"
 
-__samtools_version__ = "0.1.16"
+__samtools_version__ = "0.1.18"
 
 __tabix_version__ = "0.2.5"
index 28cdbd74b0d751246c6726f5f88a1499eb87a30f..ad263395de51eb3b38d56ffdcd9041a8dac1864e 100644 (file)
@@ -34,7 +34,7 @@ int32_t bam_cigar2qlen(const bam1_core_t *c, const uint32_t *cigar)
        int32_t l = 0;
        for (k = 0; k < c->n_cigar; ++k) {
                int op = cigar[k] & BAM_CIGAR_MASK;
-               if (op == BAM_CMATCH || op == BAM_CINS || op == BAM_CSOFT_CLIP)
+               if (op == BAM_CMATCH || op == BAM_CINS || op == BAM_CSOFT_CLIP || op == BAM_CEQUAL || op == BAM_CDIFF)
                        l += cigar[k] >> BAM_CIGAR_SHIFT;
        }
        return l;
@@ -270,7 +270,7 @@ char *bam_format1_core(const bam_header_t *header, const bam1_t *b, int of)
        else {
                for (i = 0; i < c->n_cigar; ++i) {
                        kputw(bam1_cigar(b)[i]>>BAM_CIGAR_SHIFT, &str);
-                       kputc("MIDNSHP"[bam1_cigar(b)[i]&BAM_CIGAR_MASK], &str);
+                       kputc("MIDNSHP=X"[bam1_cigar(b)[i]&BAM_CIGAR_MASK], &str);
                }
        }
        kputc('\t', &str);
index e7360bb8ef2fc2ff245a716ccfaf22d827ed3f96..346c750c8c807c44ea32804eeb1bb93411d0b71a 100644 (file)
@@ -40,7 +40,7 @@
   @copyright Genome Research Ltd.
  */
 
-#define BAM_VERSION "0.1.16 (r963:234)"
+#define BAM_VERSION "0.1.18 (r982:295)"
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -134,20 +134,25 @@ typedef struct {
 /*
   CIGAR operations.
  */
-/*! @abstract CIGAR: match */
+/*! @abstract CIGAR: M = match or mismatch*/
 #define BAM_CMATCH      0
-/*! @abstract CIGAR: insertion to the reference */
+/*! @abstract CIGAR: I = insertion to the reference */
 #define BAM_CINS        1
-/*! @abstract CIGAR: deletion from the reference */
+/*! @abstract CIGAR: D = deletion from the reference */
 #define BAM_CDEL        2
-/*! @abstract CIGAR: skip on the reference (e.g. spliced alignment) */
+/*! @abstract CIGAR: N = skip on the reference (e.g. spliced alignment) */
 #define BAM_CREF_SKIP   3
-/*! @abstract CIGAR: clip on the read with clipped sequence present in qseq */
+/*! @abstract CIGAR: S = clip on the read with clipped sequence
+  present in qseq */
 #define BAM_CSOFT_CLIP  4
-/*! @abstract CIGAR: clip on the read with clipped sequence trimmed off */
+/*! @abstract CIGAR: H = clip on the read with clipped sequence trimmed off */
 #define BAM_CHARD_CLIP  5
-/*! @abstract CIGAR: padding */
+/*! @abstract CIGAR: P = padding */
 #define BAM_CPAD        6
+/*! @abstract CIGAR: equals = match */
+#define BAM_CEQUAL        7
+/*! @abstract CIGAR: X = mismatch */
+#define BAM_CDIFF        8
 
 /*! @typedef
   @abstract Structure for core alignment information.
index 06f85998d432012ac9baa56fa2f8ded3ae68ec5e..ece837ae71089cb2640d5401143a449d5eae5fed 100644 (file)
@@ -41,6 +41,7 @@ void bcf_call_destroy(bcf_callaux_t *bca)
  * negative if we are looking at an indel. */
 int bcf_call_glfgen(int _n, const bam_pileup1_t *pl, int ref_base, bcf_callaux_t *bca, bcf_callret1_t *r)
 {
+    static int *var_pos = NULL, nvar_pos = 0;
        int i, n, ref4, is_indel, ori_depth = 0;
        memset(r, 0, sizeof(bcf_callret1_t));
        if (ref_base >= 0) {
@@ -96,9 +97,92 @@ int bcf_call_glfgen(int _n, const bam_pileup1_t *pl, int ref_base, bcf_callaux_t
        r->depth = n; r->ori_depth = ori_depth;
        // glfgen
        errmod_cal(bca->e, n, 5, bca->bases, r->p);
+
+    // Calculate the Variant Distance Bias (make it optional?)
+    if ( nvar_pos < _n ) {
+        nvar_pos = _n;
+        var_pos = realloc(var_pos,sizeof(int)*nvar_pos);
+    }
+    int alt_dp=0, read_len=0;
+    for (i=0; i<_n; i++) {
+        const bam_pileup1_t *p = pl + i;
+        if ( bam1_seqi(bam1_seq(p->b),p->qpos) == ref_base ) 
+            continue;
+
+        var_pos[alt_dp] = p->qpos;
+        if ( (bam1_cigar(p->b)[0]&BAM_CIGAR_MASK)==4 )
+            var_pos[alt_dp] -= bam1_cigar(p->b)[0]>>BAM_CIGAR_SHIFT;
+
+        alt_dp++;
+        read_len += p->b->core.l_qseq;
+    }
+    float mvd=0;
+    int j;
+    n=0;
+    for (i=0; i<alt_dp; i++) {
+        for (j=0; j<i; j++) {
+            mvd += abs(var_pos[i] - var_pos[j]);
+            n++;
+        }
+    }
+    r->mvd[0] = n ? mvd/n : 0;
+    r->mvd[1] = alt_dp;
+    r->mvd[2] = alt_dp ? read_len/alt_dp : 0;
+
        return r->depth;
 }
 
+
+void calc_vdb(int n, const bcf_callret1_t *calls, bcf_call_t *call)
+{
+    // Variant distance bias. Samples merged by means of DP-weighted average.
+
+    float weight=0, tot_prob=0;
+
+    int i;
+    for (i=0; i<n; i++)
+    {
+        int mvd      = calls[i].mvd[0];
+        int dp       = calls[i].mvd[1];
+        int read_len = calls[i].mvd[2];
+
+        if ( dp<2 ) continue;
+
+        float prob = 0;
+        if ( dp==2 )
+        {
+            // Exact formula
+            prob = (mvd==0) ? 1.0/read_len : (read_len-mvd)*2.0/read_len/read_len;
+        }
+        else if ( dp==3 )
+        {
+            // Sin, quite accurate approximation
+            float mu = read_len/2.9;
+            prob = mvd>2*mu ? 0 : sin(mvd*3.14/2/mu) / (4*mu/3.14);
+        }
+        else
+        {
+            // Scaled gaussian curve, crude approximation, but behaves well. Using fixed depth for bigger depths.
+            if ( dp>5 )
+                dp = 5;
+            float sigma2 = (read_len/1.9/(dp+1)) * (read_len/1.9/(dp+1));
+            float norm   = 1.125*sqrt(2*3.14*sigma2);
+            float mu     = read_len/2.9;
+            if ( mvd < mu )
+                prob = exp(-(mvd-mu)*(mvd-mu)/2/sigma2)/norm;
+            else
+                prob = exp(-(mvd-mu)*(mvd-mu)/3.125/sigma2)/norm;
+        }
+
+        //fprintf(pysamerr,"dp=%d mvd=%d read_len=%d -> prob=%f\n", dp,mvd,read_len,prob);
+        tot_prob += prob*dp;
+        weight += dp;
+    }
+    tot_prob = weight ? tot_prob/weight : 1; 
+    //fprintf(pysamerr,"prob=%f\n", tot_prob);
+    call->vdb = tot_prob;
+}
+
 int bcf_call_combine(int n, const bcf_callret1_t *calls, int ref_base /*4-bit*/, bcf_call_t *call)
 {
        int ref4, i, j, qsum[4];
@@ -172,6 +256,9 @@ int bcf_call_combine(int n, const bcf_callret1_t *calls, int ref_base /*4-bit*/,
                call->ori_depth += calls[i].ori_depth;
                for (j = 0; j < 16; ++j) call->anno[j] += calls[i].anno[j];
        }
+
+    calc_vdb(n, calls, call);
+
        return 0;
 }
 
@@ -225,6 +312,10 @@ int bcf_call2bcf(int tid, int pos, bcf_call_t *bc, bcf1_t *b, bcf_callret1_t *bc
                if (i) kputc(',', &s);
                kputw(bc->anno[i], &s);
        }
+    if ( bc->vdb!=1 )
+    {
+        ksprintf(&s, ";VDB=%.4f", bc->vdb);
+    }
        kputc('\0', &s);
        // FMT
        kputs("PL", &s);
@@ -238,7 +329,7 @@ int bcf_call2bcf(int tid, int pos, bcf_call_t *bc, bcf1_t *b, bcf_callret1_t *bc
        memcpy(b->gi[0].data, bc->PL, b->gi[0].len * bc->n);
        if (bcr) {
                uint16_t *dp = (uint16_t*)b->gi[1].data;
-               uint8_t *sp = is_SP? b->gi[2].data : 0;
+               int32_t *sp = is_SP? b->gi[2].data : 0;
                for (i = 0; i < bc->n; ++i) {
                        bcf_callret1_t *p = bcr + i;
                        dp[i] = p->depth < 0xffff? p->depth : 0xffff;
index 958567241936a4c54feae501c725ad77a6e3f1be..4af080c4753b2070192bec5e04e16174ca5bb5f8 100644 (file)
@@ -26,6 +26,7 @@ typedef struct {
        int depth, ori_depth, qsum[4];
        int anno[16];
        float p[25];
+    int mvd[3]; // mean variant distance, number of variant reads, average read length
 } bcf_callret1_t;
 
 typedef struct {
@@ -33,6 +34,7 @@ typedef struct {
        int n, n_alleles, shift, ori_ref, unseen;
        int anno[16], depth, ori_depth;
        uint8_t *PL;
+    float vdb; // variant distance bias
 } bcf_call_t;
 
 #ifdef __cplusplus
index b72864845374b07be7d9c0fb1ffb3ecd4c91b7cb..cf86ca3e39f6aad8c222ed8048fcc56f78fff62c 100644 (file)
@@ -5,12 +5,14 @@
 #include <string.h>
 #include "bam.h"
 #include "bam2bcf.h"
-#include "ksort.h"
 #include "kaln.h"
 #include "kprobaln.h"
 #include "khash.h"
 KHASH_SET_INIT_STR(rg)
 
+#include "ksort.h"
+KSORT_INIT_GENERIC(uint32_t)
+
 #define MINUS_CONST 0x10000000
 #define INDEL_WINDOW_SIZE 50
 
@@ -66,7 +68,7 @@ static int tpos2qpos(const bam1_core_t *c, const uint32_t *cigar, int32_t tpos,
        for (k = 0; k < c->n_cigar; ++k) {
                int op = cigar[k] & BAM_CIGAR_MASK;
                int l = cigar[k] >> BAM_CIGAR_SHIFT;
-               if (op == BAM_CMATCH) {
+               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                        if (c->pos > tpos) return y;
                        if (x + l > tpos) {
                                *_tpos = tpos;
@@ -112,7 +114,6 @@ static inline int est_indelreg(int pos, const char *ref, int l, char *ins4)
 int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_callaux_t *bca, const char *ref,
                                          const void *rghash)
 {
-       extern void ks_introsort_uint32_t(int, uint32_t*);
        int i, s, j, k, t, n_types, *types, max_rd_len, left, right, max_ins, *score1, *score2, max_ref2;
        int N, K, l_run, ref_type, n_alt;
        char *inscns = 0, *ref2, *query, **ref_sample;
@@ -169,6 +170,12 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla
                if (n_types == 1 || (double)n_alt / n_tot < bca->min_frac || n_alt < bca->min_support) { // then skip
                        free(aux); return -1;
                }
+               if (n_types >= 64) {
+                       free(aux);
+                       if (bam_verbose >= 2) 
+                               fprintf(pysamerr, "[%s] excessive INDEL alleles at position %d. Skip the position.\n", __func__, pos + 1);
+                       return -1;
+               }
                types = (int*)calloc(n_types, sizeof(int));
                t = 0;
                types[t++] = aux[0] - MINUS_CONST; 
@@ -179,7 +186,6 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla
                for (t = 0; t < n_types; ++t)
                        if (types[t] == 0) break;
                ref_type = t; // the index of the reference type (0)
-               assert(n_types < 64);
        }
        { // calculate left and right boundary
                left = pos > INDEL_WINDOW_SIZE? pos - INDEL_WINDOW_SIZE : 0;
@@ -218,7 +224,7 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla
                                for (k = 0; k < b->core.n_cigar; ++k) {
                                        int op = cigar[k]&0xf;
                                        int j, l = cigar[k]>>4;
-                                       if (op == BAM_CMATCH) {
+                                       if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                                                for (j = 0; j < l; ++j)
                                                        if (x + j >= left && x + j < right)
                                                                cns[x+j-left] += (bam1_seqi(seq, y+j) == ref0[x+j-left])? 1 : 0x10000;
index a1c1890e26eb85ebb2f3b53bb554aa64119a4652..14209cd831d0268150e5e6a62052ae264e9a3939 100644 (file)
@@ -61,6 +61,23 @@ int bam_aux_del(bam1_t *b, uint8_t *s)
        return 0;
 }
 
+int bam_aux_drop_other(bam1_t *b, uint8_t *s)
+{
+       if (s) {
+               uint8_t *p, *aux;
+               aux = bam1_aux(b);
+               p = s - 2;
+               __skip_tag(s);
+               memmove(aux, p, s - p);
+               b->data_len -= b->l_aux - (s - p);
+               b->l_aux = s - p;
+       } else {
+               b->data_len -= b->l_aux;
+               b->l_aux = 0;
+       }
+       return 0;
+}
+
 void bam_init_header_hash(bam_header_t *header)
 {
        if (header->hash == 0) {
@@ -89,47 +106,56 @@ int32_t bam_get_tid(const bam_header_t *header, const char *seq_name)
        return k == kh_end(h)? -1 : kh_value(h, k);
 }
 
-int bam_parse_region(bam_header_t *header, const char *str, int *ref_id, int *begin, int *end)
+int bam_parse_region(bam_header_t *header, const char *str, int *ref_id, int *beg, int *end)
 {
-       char *s, *p;
-       int i, l, k;
+       char *s;
+       int i, l, k, name_end;
        khiter_t iter;
        khash_t(s) *h;
 
        bam_init_header_hash(header);
        h = (khash_t(s)*)header->hash;
 
-       l = strlen(str);
-       p = s = (char*)malloc(l+1);
-       /* squeeze out "," */
-       for (i = k = 0; i != l; ++i)
-               if (str[i] != ',' && !isspace(str[i])) s[k++] = str[i];
-       s[k] = 0;
-       for (i = 0; i != k; ++i) if (s[i] == ':') break;
-       s[i] = 0;
-       iter = kh_get(s, h, s); /* get the ref_id */
-       if (iter == kh_end(h)) { // name not found
-               *ref_id = -1; free(s);
-               return -1;
-       }
-       *ref_id = kh_value(h, iter);
-       if (i == k) { /* dump the whole sequence */
-               *begin = 0; *end = 1<<29; free(s);
-               return 0;
-       }
-       for (p = s + i + 1; i != k; ++i) if (s[i] == '-') break;
-       *begin = atoi(p);
-       if (i < k) {
-               p = s + i + 1;
-               *end = atoi(p);
-       } else *end = 1<<29;
-       if (*begin > 0) --*begin;
+       *ref_id = *beg = *end = -1;
+       name_end = l = strlen(str);
+       s = (char*)malloc(l+1);
+       // remove space
+       for (i = k = 0; i < l; ++i)
+               if (!isspace(str[i])) s[k++] = str[i];
+       s[k] = 0; l = k;
+       // determine the sequence name
+       for (i = l - 1; i >= 0; --i) if (s[i] == ':') break; // look for colon from the end
+       if (i >= 0) name_end = i;
+       if (name_end < l) { // check if this is really the end
+               int n_hyphen = 0;
+               for (i = name_end + 1; i < l; ++i) {
+                       if (s[i] == '-') ++n_hyphen;
+                       else if (!isdigit(s[i]) && s[i] != ',') break;
+               }
+               if (i < l || n_hyphen > 1) name_end = l; // malformated region string; then take str as the name
+               s[name_end] = 0;
+               iter = kh_get(s, h, s);
+               if (iter == kh_end(h)) { // cannot find the sequence name
+                       iter = kh_get(s, h, str); // try str as the name
+                       if (iter == kh_end(h)) {
+                               if (bam_verbose >= 2) fprintf(pysamerr, "[%s] fail to determine the sequence name.\n", __func__);
+                               free(s); return -1;
+                       } else s[name_end] = ':', name_end = l;
+               }
+       } else iter = kh_get(s, h, str);
+       *ref_id = kh_val(h, iter);
+       // parse the interval
+       if (name_end < l) {
+               for (i = k = name_end + 1; i < l; ++i)
+                       if (s[i] != ',') s[k++] = s[i];
+               s[k] = 0;
+               *beg = atoi(s + name_end + 1);
+               for (i = name_end + 1; i != k; ++i) if (s[i] == '-') break;
+               *end = i < k? atoi(s + i + 1) : 1<<29;
+               if (*beg > 0) --*beg;
+       } else *beg = 0, *end = 1<<29;
        free(s);
-       if (*begin > *end) {
-               fprintf(pysamerr, "[bam_parse_region] invalid region.\n");
-               return -1;
-       }
-       return 0;
+       return *beg <= *end? 0 : -1;
 }
 
 int32_t bam_aux2i(const uint8_t *s)
index da25f036504eb75f2617ea0d837f3f3df73c796d..36a8024c286a71b7b0bfc3eeecb91645b97befb1 100644 (file)
@@ -16,7 +16,7 @@
 #include "kseq.h"
 #include "khash.h"
 
-KSTREAM_INIT(gzFile, gzread, 8192)
+KSTREAM_INIT(gzFile, gzread, 16384)
 KHASH_MAP_INIT_STR(ref, uint64_t)
 
 void bam_init_header_hash(bam_header_t *header);
@@ -294,20 +294,22 @@ int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b)
                z += str->l + 1;
                if (str->s[0] != '*') {
                        for (s = str->s; *s; ++s) {
-                               if (isalpha(*s)) ++c->n_cigar;
+                               if ((isalpha(*s)) || (*s=='=')) ++c->n_cigar;
                                else if (!isdigit(*s)) parse_error(fp->n_lines, "invalid CIGAR character");
                        }
                        b->data = alloc_data(b, doff + c->n_cigar * 4);
                        for (i = 0, s = str->s; i != c->n_cigar; ++i) {
                                x = strtol(s, &t, 10);
                                op = toupper(*t);
-                               if (op == 'M' || op == '=' || op == 'X') op = BAM_CMATCH;
+                               if (op == 'M') op = BAM_CMATCH;
                                else if (op == 'I') op = BAM_CINS;
                                else if (op == 'D') op = BAM_CDEL;
                                else if (op == 'N') op = BAM_CREF_SKIP;
                                else if (op == 'S') op = BAM_CSOFT_CLIP;
                                else if (op == 'H') op = BAM_CHARD_CLIP;
                                else if (op == 'P') op = BAM_CPAD;
+                               else if (op == '=') op = BAM_CEQUAL;
+                               else if (op == 'X') op = BAM_CDIFF;
                                else parse_error(fp->n_lines, "invalid CIGAR operation");
                                s = t + 1;
                                bam1_cigar(b)[i] = x << BAM_CIGAR_SHIFT | op;
@@ -339,8 +341,11 @@ int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b)
                z += str->l + 1;
                if (strcmp(str->s, "*")) {
                        c->l_qseq = strlen(str->s);
-                       if (c->n_cigar && c->l_qseq != (int32_t)bam_cigar2qlen(c, bam1_cigar(b)))
-                               parse_error(fp->n_lines, "CIGAR and sequence length are inconsistent");
+                       if (c->n_cigar && c->l_qseq != (int32_t)bam_cigar2qlen(c, bam1_cigar(b))) {
+                         fprintf(pysamerr, "Line %ld, sequence length %i vs %i from CIGAR\n",
+                                 (long)fp->n_lines, c->l_qseq, (int32_t)bam_cigar2qlen(c, bam1_cigar(b)));
+                         parse_error(fp->n_lines, "CIGAR and sequence length are inconsistent");
+                       }
                        p = (uint8_t*)alloc_data(b, doff + c->l_qseq + (c->l_qseq+1)/2) + doff;
                        memset(p, 0, (c->l_qseq+1)/2);
                        for (i = 0; i < c->l_qseq; ++i)
@@ -447,7 +452,7 @@ int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b)
                                else if (str->s[5] == 'S') while (p < str->s + str->l) ((uint16_t*)s)[k++] = (uint16_t)strtol(p, &p, 0), ++p;
                                else if (str->s[5] == 'i') while (p < str->s + str->l) ((int32_t*)s)[k++]  = (int32_t)strtol(p, &p, 0),  ++p;
                                else if (str->s[5] == 'I') while (p < str->s + str->l) ((uint32_t*)s)[k++] = (uint32_t)strtol(p, &p, 0), ++p;
-                               else if (str->s[5] == 'f') while (p < str->s + str->l) ((float*)s)[k++]    = (float)strtof(p, &p),       ++p;
+                               else if (str->s[5] == 'f') while (p < str->s + str->l) ((float*)s)[k++]    = (float)strtod(p, &p),       ++p;
                                else parse_error(fp->n_lines, "unrecognized array type");
                                s += Bsize * n; doff += size;
                        } else parse_error(fp->n_lines, "unrecognized type");
index e6c90bdc2d23cb47466e3ed103f820fa92a11356..6ae2ac36dc018ed906318b8861f6f5e7e15fcb6d 100644 (file)
@@ -174,19 +174,23 @@ bam_index_t *bam_index_core(bamFile fp)
 
        save_bin = save_tid = last_tid = last_bin = 0xffffffffu;
        save_off = last_off = bam_tell(fp); last_coor = 0xffffffffu;
-    n_mapped = n_unmapped = n_no_coor = off_end = 0;
+       n_mapped = n_unmapped = n_no_coor = off_end = 0;
        off_beg = off_end = bam_tell(fp);
        while ((ret = bam_read1(fp, b)) >= 0) {
                if (c->tid < 0) ++n_no_coor;
-               if (last_tid != c->tid) { // change of chromosomes
+               if (last_tid < c->tid || (last_tid >= 0 && c->tid < 0)) { // change of chromosomes
                        last_tid = c->tid;
                        last_bin = 0xffffffffu;
-               } else if (last_coor > c->pos) {
+               } else if ((uint32_t)last_tid > (uint32_t)c->tid) {
+                       fprintf(pysamerr, "[bam_index_core] the alignment is not sorted (%s): %d-th chr > %d-th chr\n",
+                                       bam1_qname(b), last_tid+1, c->tid+1);
+                       return NULL;
+               } else if ((int32_t)c->tid >= 0 && last_coor > c->pos) {
                        fprintf(pysamerr, "[bam_index_core] the alignment is not sorted (%s): %u > %u in %d-th chr\n",
                                        bam1_qname(b), last_coor, c->pos, c->tid+1);
-                       exit(1);
+                       return NULL;
                }
-               if (c->tid >= 0) insert_offset2(&idx->index2[b->core.tid], b, last_off);
+               if (c->tid >= 0 && !(c->flag & BAM_FUNMAP)) insert_offset2(&idx->index2[b->core.tid], b, last_off);
                if (c->bin != last_bin) { // then possibly write the binning index
                        if (save_bin != 0xffffffffu) // save_bin==0xffffffffu only happens to the first record
                                insert_offset(idx->index[save_tid], save_bin, save_off, last_off);
@@ -205,7 +209,7 @@ bam_index_t *bam_index_core(bamFile fp)
                if (bam_tell(fp) <= last_off) {
                        fprintf(pysamerr, "[bam_index_core] bug in BGZF/RAZF: %llx < %llx\n",
                                        (unsigned long long)bam_tell(fp), (unsigned long long)last_off);
-                       exit(1);
+                       return NULL;
                }
                if (c->flag & BAM_FUNMAP) ++n_unmapped;
                else ++n_mapped;
@@ -224,7 +228,7 @@ bam_index_t *bam_index_core(bamFile fp)
                        ++n_no_coor;
                        if (c->tid >= 0 && n_no_coor) {
                                fprintf(pysamerr, "[bam_index_core] the alignment is not sorted: reads without coordinates prior to reads with coordinates.\n");
-                               exit(1);
+                               return NULL;
                        }
                }
        }
@@ -475,6 +479,10 @@ int bam_index_build2(const char *fn, const char *_fnidx)
        }
        idx = bam_index_core(fp);
        bam_close(fp);
+       if(idx == 0) {
+               fprintf(pysamerr, "[bam_index_build2] fail to index the BAM file.\n");
+               return -1;
+       }
        if (_fnidx == 0) {
                fnidx = (char*)calloc(strlen(fn) + 5, 1);
                strcpy(fnidx, fn); strcat(fnidx, ".bai");
diff --git a/samtools/bam_maqcns.c.pysam.c b/samtools/bam_maqcns.c.pysam.c
deleted file mode 100644 (file)
index 513a251..0000000
+++ /dev/null
@@ -1,628 +0,0 @@
-#include "pysam.h"
-
-#include <math.h>
-#include <assert.h>
-#include "bam.h"
-#include "bam_maqcns.h"
-#include "ksort.h"
-#include "errmod.h"
-#include "kaln.h"
-KSORT_INIT_GENERIC(uint32_t)
-
-#define INDEL_WINDOW_SIZE 50
-#define INDEL_EXT_DEP 0.9
-
-typedef struct __bmc_aux_t {
-       int max;
-       uint32_t *info;
-       uint16_t *info16;
-       errmod_t *em;
-} bmc_aux_t;
-
-typedef struct {
-       float esum[4], fsum[4];
-       uint32_t c[4];
-} glf_call_aux_t;
-
-/*
-  P(<b1,b2>) = \theta \sum_{i=1}^{N-1} 1/i
-  P(D|<b1,b2>) = \sum_{k=1}^{N-1} p_k 1/2 [(k/N)^n_2(1-k/N)^n_1 + (k/N)^n1(1-k/N)^n_2]
-  p_k = 1/k / \sum_{i=1}^{N-1} 1/i
- */
-static void cal_het(bam_maqcns_t *aa)
-{
-       int k, n1, n2;
-       double sum_harmo; // harmonic sum
-       double poly_rate;
-
-       free(aa->lhet);
-       aa->lhet = (double*)calloc(256 * 256, sizeof(double));
-       sum_harmo = 0.0;
-       for (k = 1; k <= aa->n_hap - 1; ++k)
-               sum_harmo += 1.0 / k;
-       for (n1 = 0; n1 < 256; ++n1) {
-               for (n2 = 0; n2 < 256; ++n2) {
-                       long double sum = 0.0;
-                       double lC = aa->errmod == BAM_ERRMOD_SOAP? 0 : lgamma(n1+n2+1) - lgamma(n1+1) - lgamma(n2+1);
-                       for (k = 1; k <= aa->n_hap - 1; ++k) {
-                               double pk = 1.0 / k / sum_harmo;
-                               double log1 = log((double)k/aa->n_hap);
-                               double log2 = log(1.0 - (double)k/aa->n_hap);
-                               sum += pk * 0.5 * (expl(log1*n2) * expl(log2*n1) + expl(log1*n1) * expl(log2*n2));
-                       }
-                       aa->lhet[n1<<8|n2] = lC + logl(sum);
-               }
-       }
-       poly_rate = aa->het_rate * sum_harmo;
-       aa->q_r = -4.343 * log(2.0 * poly_rate / (1.0 - poly_rate));
-}
-
-/** initialize the helper structure */
-static void cal_coef(bam_maqcns_t *aa)
-{
-       int k, n, q;
-       long double sum_a[257], b[256], q_c[256], tmp[256], fk2[256];
-       double *lC;
-
-       if (aa->errmod == BAM_ERRMOD_MAQ2) return; // no need to do the following
-       // aa->lhet will be allocated and initialized 
-       free(aa->fk); free(aa->coef);
-       aa->coef = 0;
-       aa->fk = (double*)calloc(256, sizeof(double));
-       aa->fk[0] = fk2[0] = 1.0;
-       for (n = 1; n != 256; ++n) {
-               aa->fk[n] = pow(aa->theta, n) * (1.0 - aa->eta) + aa->eta;
-               fk2[n] = aa->fk[n>>1]; // this is an approximation, assuming reads equally likely come from both strands
-       }
-       if (aa->errmod == BAM_ERRMOD_SOAP) return;
-       aa->coef = (double*)calloc(256*256*64, sizeof(double));
-       lC = (double*)calloc(256 * 256, sizeof(double));
-       for (n = 1; n != 256; ++n)
-               for (k = 1; k <= n; ++k)
-                       lC[n<<8|k] = lgamma(n+1) - lgamma(k+1) - lgamma(n-k+1);
-       for (q = 1; q != 64; ++q) {
-               double e = pow(10.0, -q/10.0);
-               double le = log(e);
-               double le1 = log(1.0-e);
-               for (n = 1; n != 256; ++n) {
-                       double *coef = aa->coef + (q<<16|n<<8);
-                       sum_a[n+1] = 0.0;
-                       for (k = n; k >= 0; --k) { // a_k = \sum_{i=k}^n C^n_k \epsilon^k (1-\epsilon)^{n-k}
-                               sum_a[k] = sum_a[k+1] + expl(lC[n<<8|k] + k*le + (n-k)*le1);
-                               b[k] = sum_a[k+1] / sum_a[k];
-                               if (b[k] > 0.99) b[k] = 0.99;
-                       }
-                       for (k = 0; k != n; ++k) // log(\bar\beta_{nk}(\bar\epsilon)^{f_k})
-                               q_c[k] = -4.343 * fk2[k] * logl(b[k] / e);
-                       for (k = 1; k != n; ++k) q_c[k] += q_c[k-1]; // \prod_{i=0}^k c_i
-                       for (k = 0; k <= n; ++k) { // powl() in 64-bit mode seems broken on my Mac OS X 10.4.9
-                               tmp[k] = -4.343 * logl(1.0 - expl(fk2[k] * logl(b[k])));
-                               coef[k] = (k? q_c[k-1] : 0) + tmp[k]; // this is the final c_{nk}
-                       }
-               }
-       }
-       free(lC);
-}
-
-bam_maqcns_t *bam_maqcns_init()
-{
-       bam_maqcns_t *bm;
-       bm = (bam_maqcns_t*)calloc(1, sizeof(bam_maqcns_t));
-       bm->aux = (bmc_aux_t*)calloc(1, sizeof(bmc_aux_t));
-       bm->het_rate = 0.001;
-       bm->theta = 0.83f;
-       bm->n_hap = 2;
-       bm->eta = 0.03;
-       bm->cap_mapQ = 60;
-       bm->min_baseQ = 13;
-       return bm;
-}
-
-void bam_maqcns_prepare(bam_maqcns_t *bm)
-{
-       if (bm->errmod == BAM_ERRMOD_MAQ2) bm->aux->em = errmod_init(1. - bm->theta);
-       cal_coef(bm); cal_het(bm);
-}
-
-void bam_maqcns_destroy(bam_maqcns_t *bm)
-{
-       if (bm == 0) return;
-       free(bm->lhet); free(bm->fk); free(bm->coef); free(bm->aux->info); free(bm->aux->info16);
-       if (bm->aux->em) errmod_destroy(bm->aux->em);
-       free(bm->aux); free(bm);
-}
-
-glf1_t *bam_maqcns_glfgen(int _n, const bam_pileup1_t *pl, uint8_t ref_base, bam_maqcns_t *bm)
-{
-       glf_call_aux_t *b = 0;
-       int i, j, k, w[8], c, n;
-       glf1_t *g = (glf1_t*)calloc(1, sizeof(glf1_t));
-       float p[16], min_p = 1e30;
-       uint64_t rms;
-
-       g->ref_base = ref_base;
-       if (_n == 0) return g;
-
-       // construct aux array
-       if (bm->aux->max < _n) {
-               bm->aux->max = _n;
-               kroundup32(bm->aux->max);
-               bm->aux->info = (uint32_t*)realloc(bm->aux->info, 4 * bm->aux->max);
-               bm->aux->info16 = (uint16_t*)realloc(bm->aux->info16, 2 * bm->aux->max);
-       }
-       for (i = n = 0, rms = 0; i < _n; ++i) {
-               const bam_pileup1_t *p = pl + i;
-               uint32_t q, x = 0, qq;
-               uint16_t y = 0;
-               if (p->is_del || p->is_refskip || (p->b->core.flag&BAM_FUNMAP)) continue;
-               q = (uint32_t)bam1_qual(p->b)[p->qpos];
-               if (q < bm->min_baseQ) continue;
-               x |= (uint32_t)bam1_strand(p->b) << 18 | q << 8 | p->b->core.qual;
-               y |= bam1_strand(p->b)<<4;
-               if (p->b->core.qual < q) q = p->b->core.qual;
-               c = p->b->core.qual < bm->cap_mapQ? p->b->core.qual : bm->cap_mapQ;
-               rms += c * c;
-               x |= q << 24;
-               y |= q << 5;
-               qq = bam1_seqi(bam1_seq(p->b), p->qpos);
-               q = bam_nt16_nt4_table[qq? qq : ref_base];
-               if (!p->is_del && !p->is_refskip && q < 4) x |= 1 << 21 | q << 16, y |= q;
-               bm->aux->info16[n] = y;
-               bm->aux->info[n++] = x;
-       }
-       rms = (uint8_t)(sqrt((double)rms / n) + .499);
-       if (bm->errmod == BAM_ERRMOD_MAQ2) {
-               errmod_cal(bm->aux->em, n, 4, bm->aux->info16, p);
-               goto goto_glf;
-       }
-       ks_introsort(uint32_t, n, bm->aux->info);
-       // generate esum and fsum
-       b = (glf_call_aux_t*)calloc(1, sizeof(glf_call_aux_t));
-       for (k = 0; k != 8; ++k) w[k] = 0;
-       for (j = n - 1; j >= 0; --j) { // calculate esum and fsum
-               uint32_t info = bm->aux->info[j];
-               if (info>>24 < 4 && (info>>8&0x3f) != 0) info = 4<<24 | (info&0xffffff);
-               k = info>>16&7;
-               if (info>>24 > 0) {
-                       b->esum[k&3] += bm->fk[w[k]] * (info>>24);
-                       b->fsum[k&3] += bm->fk[w[k]];
-                       if (w[k] < 0xff) ++w[k];
-                       ++b->c[k&3];
-               }
-       }
-       // rescale ->c[]
-       for (j = c = 0; j != 4; ++j) c += b->c[j];
-       if (c > 255) {
-               for (j = 0; j != 4; ++j) b->c[j] = (int)(254.0 * b->c[j] / c + 0.5);
-               for (j = c = 0; j != 4; ++j) c += b->c[j];
-       }
-       if (bm->errmod == BAM_ERRMOD_MAQ) {
-               // generate likelihood
-               for (j = 0; j != 4; ++j) {
-                       // homozygous
-                       float tmp1, tmp3;
-                       int tmp2, bar_e;
-                       for (k = 0, tmp1 = tmp3 = 0.0, tmp2 = 0; k != 4; ++k) {
-                               if (j == k) continue;
-                               tmp1 += b->esum[k]; tmp2 += b->c[k]; tmp3 += b->fsum[k];
-                       }
-                       if (tmp2) {
-                               bar_e = (int)(tmp1 / tmp3 + 0.5);
-                               if (bar_e < 4) bar_e = 4; // should not happen
-                               if (bar_e > 63) bar_e = 63;
-                               p[j<<2|j] = tmp1 + bm->coef[bar_e<<16|c<<8|tmp2];
-                       } else p[j<<2|j] = 0.0; // all the bases are j
-                       // heterozygous
-                       for (k = j + 1; k < 4; ++k) {
-                               for (i = 0, tmp2 = 0, tmp1 = tmp3 = 0.0; i != 4; ++i) {
-                                       if (i == j || i == k) continue;
-                                       tmp1 += b->esum[i]; tmp2 += b->c[i]; tmp3 += b->fsum[i];
-                               }
-                               if (tmp2) {
-                                       bar_e = (int)(tmp1 / tmp3 + 0.5);
-                                       if (bar_e < 4) bar_e = 4;
-                                       if (bar_e > 63) bar_e = 63;
-                                       p[j<<2|k] = p[k<<2|j] = -4.343 * bm->lhet[b->c[j]<<8|b->c[k]] + tmp1 + bm->coef[bar_e<<16|c<<8|tmp2];
-                               } else p[j<<2|k] = p[k<<2|j] = -4.343 * bm->lhet[b->c[j]<<8|b->c[k]]; // all the bases are either j or k
-                       }
-                       //
-                       for (k = 0; k != 4; ++k)
-                               if (p[j<<2|k] < 0.0) p[j<<2|k] = 0.0;
-               }
-
-               { // fix p[k<<2|k]
-                       float max1, max2, min1, min2;
-                       int max_k, min_k;
-                       max_k = min_k = -1;
-                       max1 = max2 = -1.0; min1 = min2 = 1e30;
-                       for (k = 0; k < 4; ++k) {
-                               if (b->esum[k] > max1) {
-                                       max2 = max1; max1 = b->esum[k]; max_k = k;
-                               } else if (b->esum[k] > max2) max2 = b->esum[k];
-                       }
-                       for (k = 0; k < 4; ++k) {
-                               if (p[k<<2|k] < min1) {
-                                       min2 = min1; min1 = p[k<<2|k]; min_k = k;
-                               } else if (p[k<<2|k] < min2) min2 = p[k<<2|k];
-                       }
-                       if (max1 > max2 && (min_k != max_k || min1 + 1.0 > min2))
-                               p[max_k<<2|max_k] = min1 > 1.0? min1 - 1.0 : 0.0;
-               }
-       } else if (bm->errmod == BAM_ERRMOD_SOAP) { // apply the SOAP model
-               // generate likelihood
-               for (j = 0; j != 4; ++j) {
-                       float tmp;
-                       // homozygous
-                       for (k = 0, tmp = 0.0; k != 4; ++k)
-                               if (j != k) tmp += b->esum[k];
-                       p[j<<2|j] = tmp;
-                       // heterozygous
-                       for (k = j + 1; k < 4; ++k) {
-                               for (i = 0, tmp = 0.0; i != 4; ++i)
-                                       if (i != j && i != k) tmp += b->esum[i];
-                               p[j<<2|k] = p[k<<2|j] = -4.343 * bm->lhet[b->c[j]<<8|b->c[k]] + tmp;
-                       }
-               }
-       }
-
-goto_glf:
-       // convert necessary information to glf1_t
-       g->ref_base = ref_base; g->max_mapQ = rms;
-       g->depth = n > 16777215? 16777215 : n;
-       for (j = 0; j != 4; ++j)
-               for (k = j; k < 4; ++k)
-                       if (p[j<<2|k] < min_p) min_p = p[j<<2|k];
-       g->min_lk = min_p > 255.0? 255 : (int)(min_p + 0.5);
-       for (j = c = 0; j != 4; ++j)
-               for (k = j; k < 4; ++k)
-                       g->lk[c++] = p[j<<2|k]-min_p > 255.0? 255 : (int)(p[j<<2|k]-min_p + 0.5);
-
-       free(b);
-       return g;
-}
-
-uint32_t glf2cns(const glf1_t *g, int q_r)
-{
-       int i, j, k, p[10], ref4;
-       uint32_t x = 0;
-       ref4 = bam_nt16_nt4_table[g->ref_base];
-       for (i = k = 0; i < 4; ++i)
-               for (j = i; j < 4; ++j) {
-                       int prior = (i == ref4 && j == ref4? 0 : i == ref4 || j == ref4? q_r : q_r + 3);
-                       p[k] = (g->lk[k] + prior)<<4 | i<<2 | j;
-                       ++k;
-               }
-       for (i = 1; i < 10; ++i) // insertion sort
-               for (j = i; j > 0 && p[j] < p[j-1]; --j)
-                       k = p[j], p[j] = p[j-1], p[j-1] = k;
-       x = (1u<<(p[0]&3) | 1u<<(p[0]>>2&3)) << 28; // the best genotype
-       x |= (uint32_t)g->max_mapQ << 16; // rms mapQ
-       x |= ((p[1]>>4) - (p[0]>>4) < 256? (p[1]>>4) - (p[0]>>4) : 255) << 8; // consensus Q
-       for (k = 0; k < 10; ++k)
-               if ((p[k]&0xf) == (ref4<<2|ref4)) break;
-       if (k == 10) k = 9;
-       x |= (p[k]>>4) - (p[0]>>4) < 256? (p[k]>>4) - (p[0]>>4) : 255; // snp Q
-       return x;
-}
-
-uint32_t bam_maqcns_call(int n, const bam_pileup1_t *pl, bam_maqcns_t *bm)
-{
-       glf1_t *g;
-       uint32_t x;
-       if (n) {
-               g = bam_maqcns_glfgen(n, pl, 0xf, bm);
-               x = g->depth == 0? (0xfU<<28 | 0xfU<<24) : glf2cns(g, (int)(bm->q_r + 0.5));
-               free(g);
-       } else x = 0xfU<<28 | 0xfU<<24;
-       return x;
-}
-
-/************** *****************/
-
-bam_maqindel_opt_t *bam_maqindel_opt_init()
-{
-       bam_maqindel_opt_t *mi = (bam_maqindel_opt_t*)calloc(1, sizeof(bam_maqindel_opt_t));
-       mi->q_indel = 40;
-       mi->r_indel = 0.00015;
-       mi->r_snp = 0.001;
-       //
-       mi->mm_penalty = 3;
-       mi->indel_err = 4;
-       mi->ambi_thres = 10;
-       return mi;
-}
-
-void bam_maqindel_ret_destroy(bam_maqindel_ret_t *mir)
-{
-       if (mir == 0) return;
-       free(mir->s[0]); free(mir->s[1]); free(mir);
-}
-
-int bam_tpos2qpos(const bam1_core_t *c, const uint32_t *cigar, int32_t tpos, int is_left, int32_t *_tpos)
-{
-       int k, x = c->pos, y = 0, last_y = 0;
-       *_tpos = c->pos;
-       for (k = 0; k < c->n_cigar; ++k) {
-               int op = cigar[k] & BAM_CIGAR_MASK;
-               int l = cigar[k] >> BAM_CIGAR_SHIFT;
-               if (op == BAM_CMATCH) {
-                       if (c->pos > tpos) return y;
-                       if (x + l > tpos) {
-                               *_tpos = tpos;
-                               return y + (tpos - x);
-                       }
-                       x += l; y += l;
-                       last_y = y;
-               } else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) y += l;
-               else if (op == BAM_CDEL || op == BAM_CREF_SKIP) {
-                       if (x + l > tpos) {
-                               *_tpos = is_left? x : x + l;
-                               return y;
-                       }
-                       x += l;
-               }
-       }
-       *_tpos = x;
-       return last_y;
-}
-
-#define MINUS_CONST 0x10000000
-
-bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, const bam_pileup1_t *pl, const char *ref,
-                                                                int _n_types, int *_types)
-{
-       int i, j, n_types, *types, left, right, max_rd_len = 0;
-       bam_maqindel_ret_t *ret = 0;
-       // if there is no proposed indel, check if there is an indel from the alignment
-       if (_n_types == 0) {
-               for (i = 0; i < n; ++i) {
-                       const bam_pileup1_t *p = pl + i;
-                       if (!(p->b->core.flag&BAM_FUNMAP) && p->indel != 0) break;
-               }
-               if (i == n) return 0; // no indel
-       }
-       { // calculate how many types of indels are available (set n_types and types)
-               int m;
-               uint32_t *aux;
-               aux = (uint32_t*)calloc(n + _n_types + 1, 4);
-               m = 0;
-               aux[m++] = MINUS_CONST; // zero indel is always a type
-               for (i = 0; i < n; ++i) {
-                       const bam_pileup1_t *p = pl + i;
-                       if (!(p->b->core.flag&BAM_FUNMAP) && p->indel != 0)
-                               aux[m++] = MINUS_CONST + p->indel;
-                       j = bam_cigar2qlen(&p->b->core, bam1_cigar(p->b));
-                       if (j > max_rd_len) max_rd_len = j;
-               }
-               if (_n_types) // then also add this to aux[]
-                       for (i = 0; i < _n_types; ++i)
-                               if (_types[i]) aux[m++] = MINUS_CONST + _types[i];
-               ks_introsort(uint32_t, m, aux);
-               // squeeze out identical types
-               for (i = 1, n_types = 1; i < m; ++i)
-                       if (aux[i] != aux[i-1]) ++n_types;
-               types = (int*)calloc(n_types, sizeof(int));
-               j = 0;
-               types[j++] = aux[0] - MINUS_CONST; 
-               for (i = 1; i < m; ++i) {
-                       if (aux[i] != aux[i-1])
-                               types[j++] = aux[i] - MINUS_CONST;
-               }
-               free(aux);
-       }
-       { // calculate left and right boundary
-               left = pos > INDEL_WINDOW_SIZE? pos - INDEL_WINDOW_SIZE : 0;
-               right = pos + INDEL_WINDOW_SIZE;
-               if (types[0] < 0) right -= types[0];
-               // in case the alignments stand out the reference
-               for (i = pos; i < right; ++i)
-                       if (ref[i] == 0) break;
-               right = i;
-       }
-       { // the core part
-               char *ref2, *rs, *inscns = 0;
-               int qr_snp, k, l, *score, *pscore, max_ins = types[n_types-1];
-               qr_snp = (int)(-4.343 * log(mi->r_snp) + .499);
-               if (max_ins > 0) { // get the consensus of inserted sequences
-                       int *inscns_aux = (int*)calloc(4 * n_types * max_ins, sizeof(int));
-                       // count occurrences
-                       for (i = 0; i < n_types; ++i) {
-                               if (types[i] <= 0) continue; // not insertion
-                               for (j = 0; j < n; ++j) {
-                                       const bam_pileup1_t *p = pl + j;
-                                       if (!(p->b->core.flag&BAM_FUNMAP) && p->indel == types[i]) {
-                                               for (k = 1; k <= p->indel; ++k) {
-                                                       int c = bam_nt16_nt4_table[bam1_seqi(bam1_seq(p->b), p->qpos + k)];
-                                                       if (c < 4) ++inscns_aux[i*max_ins*4 + (k-1)*4 + c];
-                                               }
-                                       }
-                               }
-                       }
-                       // construct the consensus of inserted sequence
-                       inscns = (char*)calloc(n_types * max_ins, sizeof(char));
-                       for (i = 0; i < n_types; ++i) {
-                               for (j = 0; j < types[i]; ++j) {
-                                       int max = 0, max_k = -1, *ia = inscns_aux + i*max_ins*4 + j*4;
-                                       for (k = 0; k < 4; ++k) {
-                                               if (ia[k] > max) {
-                                                       max = ia[k];
-                                                       max_k = k;
-                                               }
-                                       }
-                                       inscns[i*max_ins + j] = max? 1<<max_k : 15;
-                               }
-                       }
-                       free(inscns_aux);
-               }
-               // calculate score
-               ref2 = (char*)calloc(right - left + types[n_types-1] + 2, 1);
-               rs   = (char*)calloc(right - left + max_rd_len + types[n_types-1] + 2, 1);
-               score = (int*)calloc(n_types * n, sizeof(int));
-               pscore = (int*)calloc(n_types * n, sizeof(int));
-               for (i = 0; i < n_types; ++i) {
-                       ka_param_t ap = ka_param_blast;
-                       ap.band_width = 2 * types[n_types - 1] + 2;
-                       ap.gap_end_ext = 0;
-                       // write ref2
-                       for (k = 0, j = left; j <= pos; ++j)
-                               ref2[k++] = bam_nt16_nt4_table[bam_nt16_table[(int)ref[j]]];
-                       if (types[i] <= 0) j += -types[i];
-                       else for (l = 0; l < types[i]; ++l)
-                                        ref2[k++] = bam_nt16_nt4_table[(int)inscns[i*max_ins + l]];
-                       if (types[0] < 0) { // mask deleted sequences
-                               int jj, tmp = types[i] >= 0? -types[0] : -types[0] + types[i];
-                               for (jj = 0; jj < tmp && j < right && ref[j]; ++jj, ++j)
-                                       ref2[k++] = 4;
-                       }
-                       for (; j < right && ref[j]; ++j)
-                               ref2[k++] = bam_nt16_nt4_table[bam_nt16_table[(int)ref[j]]];
-                       if (j < right) right = j;
-                       // calculate score for each read
-                       for (j = 0; j < n; ++j) {
-                               const bam_pileup1_t *p = pl + j;
-                               int qbeg, qend, tbeg, tend;
-                               if (p->b->core.flag & BAM_FUNMAP) continue;
-                               qbeg = bam_tpos2qpos(&p->b->core, bam1_cigar(p->b), left,  0, &tbeg);
-                               qend = bam_tpos2qpos(&p->b->core, bam1_cigar(p->b), right, 1, &tend);
-                               assert(tbeg >= left);
-                               for (l = qbeg; l < qend; ++l)
-                                       rs[l - qbeg] = bam_nt16_nt4_table[bam1_seqi(bam1_seq(p->b), l)];
-                               {
-                                       int x, y, n_acigar, ps;
-                                       uint32_t *acigar;
-                                       ps = 0;
-                                       if (tend - tbeg + types[i] <= 0) {
-                                               score[i*n+j] = -(1<<20);
-                                               pscore[i*n+j] = 1<<20;
-                                               continue;
-                                       }
-                                       acigar = ka_global_core((uint8_t*)ref2 + tbeg - left, tend - tbeg + types[i], (uint8_t*)rs, qend - qbeg, &ap, &score[i*n+j], &n_acigar);
-                                       x = tbeg - left; y = 0;
-                                       for (l = 0; l < n_acigar; ++l) {
-                                               int op = acigar[l]&0xf;
-                                               int len = acigar[l]>>4;
-                                               if (op == BAM_CMATCH) {
-                                                       int k;
-                                                       for (k = 0; k < len; ++k)
-                                                               if (ref2[x+k] != rs[y+k] && ref2[x+k] < 4)
-                                                                       ps += bam1_qual(p->b)[y+k] < qr_snp? bam1_qual(p->b)[y+k] : qr_snp;
-                                                       x += len; y += len;
-                                               } else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) {
-                                                       if (op == BAM_CINS && l > 0 && l < n_acigar - 1) ps += mi->q_indel * len;
-                                                       y += len;
-                                               } else if (op == BAM_CDEL) {
-                                                       if (l > 0 && l < n_acigar - 1) ps += mi->q_indel * len;
-                                                       x += len;
-                                               }
-                                       }
-                                       pscore[i*n+j] = ps;
-                                       /*if (1) { // for debugging only
-                                               fprintf(pysamerr, "id=%d, pos=%d, type=%d, j=%d, score=%d, psore=%d, %d, %d, %d, %d, %d, ",
-                                                               j, pos+1, types[i], j, score[i*n+j], pscore[i*n+j], tbeg, tend, qbeg, qend, mi->q_indel);
-                                               for (l = 0; l < n_acigar; ++l) fprintf(pysamerr, "%d%c", acigar[l]>>4, "MIDS"[acigar[l]&0xf]);
-                                               fprintf(pysamerr, "\n");
-                                               for (l = 0; l < tend - tbeg + types[i]; ++l) fputc("ACGTN"[ref2[l+tbeg-left]], pysamerr);
-                                               fputc('\n', pysamerr);
-                                               for (l = 0; l < qend - qbeg; ++l) fputc("ACGTN"[rs[l]], pysamerr);
-                                               fputc('\n', pysamerr);
-                                               }*/
-                                       free(acigar);
-                               }
-                       }
-               }
-               { // get final result
-                       int *sum, max1, max2, max1_i, max2_i;
-                       // pick up the best two score
-                       sum = (int*)calloc(n_types, sizeof(int));
-                       for (i = 0; i < n_types; ++i)
-                               for (j = 0; j < n; ++j)
-                                       sum[i] += -pscore[i*n+j];
-                       max1 = max2 = -0x7fffffff; max1_i = max2_i = -1;
-                       for (i = 0; i < n_types; ++i) {
-                               if (sum[i] > max1) {
-                                       max2 = max1; max2_i = max1_i; max1 = sum[i]; max1_i = i;
-                               } else if (sum[i] > max2) {
-                                       max2 = sum[i]; max2_i = i;
-                               }
-                       }
-                       free(sum);
-                       // write ret
-                       ret = (bam_maqindel_ret_t*)calloc(1, sizeof(bam_maqindel_ret_t));
-                       ret->indel1 = types[max1_i]; ret->indel2 = types[max2_i];
-                       ret->s[0] = (char*)calloc(abs(ret->indel1) + 2, 1);
-                       ret->s[1] = (char*)calloc(abs(ret->indel2) + 2, 1);
-                       // write indel sequence
-                       if (ret->indel1 > 0) {
-                               ret->s[0][0] = '+';
-                               for (k = 0; k < ret->indel1; ++k)
-                                       ret->s[0][k+1] = bam_nt16_rev_table[(int)inscns[max1_i*max_ins + k]];
-                       } else if (ret->indel1 < 0) {
-                               ret->s[0][0] = '-';
-                               for (k = 0; k < -ret->indel1 && ref[pos + k + 1]; ++k)
-                                       ret->s[0][k+1] = ref[pos + k + 1];
-                       } else ret->s[0][0] = '*';
-                       if (ret->indel2 > 0) {
-                               ret->s[1][0] = '+';
-                               for (k = 0; k < ret->indel2; ++k)
-                                       ret->s[1][k+1] = bam_nt16_rev_table[(int)inscns[max2_i*max_ins + k]];
-                       } else if (ret->indel2 < 0) {
-                               ret->s[1][0] = '-';
-                               for (k = 0; k < -ret->indel2 && ref[pos + k + 1]; ++k)
-                                       ret->s[1][k+1] = ref[pos + k + 1];
-                       } else ret->s[1][0] = '*';
-                       // write count
-                       for (i = 0; i < n; ++i) {
-                               const bam_pileup1_t *p = pl + i;
-                               if (p->indel == ret->indel1) ++ret->cnt1;
-                               else if (p->indel == ret->indel2) ++ret->cnt2;
-                               else ++ret->cnt_anti;
-                       }
-                       { // write gl[]
-                               int tmp, seq_err = 0;
-                               double x = 1.0;
-                               tmp = max1_i - max2_i;
-                               if (tmp < 0) tmp = -tmp;
-                               for (j = 0; j < tmp + 1; ++j) x *= INDEL_EXT_DEP;
-                               seq_err = mi->q_indel * (1.0 - x) / (1.0 - INDEL_EXT_DEP);
-                               ret->gl[0] = ret->gl[1] = 0;
-                               for (j = 0; j < n; ++j) {
-                                       int s1 = pscore[max1_i*n + j], s2 = pscore[max2_i*n + j];
-                                       //fprintf(pysamerr, "id=%d, %d, %d, %d, %d, %d\n", j, pl[j].b->core.pos+1, types[max1_i], types[max2_i], s1, s2);
-                                       if (s1 > s2) ret->gl[0] += s1 - s2 < seq_err? s1 - s2 : seq_err;
-                                       else ret->gl[1] += s2 - s1 < seq_err? s2 - s1 : seq_err;
-                               }
-                       }
-                       // write cnt_ref and cnt_ambi
-                       if (max1_i != 0 && max2_i != 0) {
-                               for (j = 0; j < n; ++j) {
-                                       int diff1 = score[j] - score[max1_i * n + j];
-                                       int diff2 = score[j] - score[max2_i * n + j];
-                                       if (diff1 > 0 && diff2 > 0) ++ret->cnt_ref;
-                                       else if (diff1 == 0 || diff2 == 0) ++ret->cnt_ambi;
-                               }
-                       }
-               }
-               free(score); free(pscore); free(ref2); free(rs); free(inscns);
-       }
-       { // call genotype
-               int q[3], qr_indel = (int)(-4.343 * log(mi->r_indel) + 0.5);
-               int min1, min2, min1_i;
-               q[0] = ret->gl[0] + (ret->s[0][0] != '*'? 0 : 0) * qr_indel;
-               q[1] = ret->gl[1] + (ret->s[1][0] != '*'? 0 : 0) * qr_indel;
-               q[2] = n * 3 + (ret->s[0][0] == '*' || ret->s[1][0] == '*'? 1 : 1) * qr_indel;
-               min1 = min2 = 0x7fffffff; min1_i = -1;
-               for (i = 0; i < 3; ++i) {
-                       if (q[i] < min1) {
-                               min2 = min1; min1 = q[i]; min1_i = i;
-                       } else if (q[i] < min2) min2 = q[i];
-               }
-               ret->gt = min1_i;
-               ret->q_cns = min2 - min1;
-               // set q_ref
-               if (ret->gt < 2) ret->q_ref = (ret->s[ret->gt][0] == '*')? 0 : q[1-ret->gt] - q[ret->gt] - qr_indel - 3;
-               else ret->q_ref = (ret->s[0][0] == '*')? q[0] - q[2] : q[1] - q[2];
-               if (ret->q_ref < 0) ret->q_ref = 0;
-       }
-       free(types);
-       return ret;
-}
diff --git a/samtools/bam_maqcns.h b/samtools/bam_maqcns.h
deleted file mode 100644 (file)
index 291ae53..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef BAM_MAQCNS_H
-#define BAM_MAQCNS_H
-
-#include "glf.h"
-
-#define BAM_ERRMOD_MAQ2 0
-#define BAM_ERRMOD_MAQ  1
-#define BAM_ERRMOD_SOAP 2
-
-struct __bmc_aux_t;
-
-typedef struct {
-       float het_rate, theta;
-       int n_hap, cap_mapQ, errmod, min_baseQ;
-
-       float eta, q_r;
-       double *fk, *coef;
-       double *lhet;
-       struct __bmc_aux_t *aux;
-} bam_maqcns_t;
-
-typedef struct {
-       int q_indel; // indel sequencing error, phred scaled
-       float r_indel; // indel prior
-       float r_snp; // snp prior
-       // hidden parameters, unchangeable from command line
-       int mm_penalty, indel_err, ambi_thres;
-} bam_maqindel_opt_t;
-
-typedef struct {
-       int indel1, indel2;
-       int cnt1, cnt2, cnt_anti;
-       int cnt_ref, cnt_ambi;
-       char *s[2];
-       //
-       int gt, gl[2];
-       int q_cns, q_ref;
-} bam_maqindel_ret_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-       bam_maqcns_t *bam_maqcns_init();
-       void bam_maqcns_prepare(bam_maqcns_t *bm);
-       void bam_maqcns_destroy(bam_maqcns_t *bm);
-       glf1_t *bam_maqcns_glfgen(int n, const bam_pileup1_t *pl, uint8_t ref_base, bam_maqcns_t *bm);
-       uint32_t bam_maqcns_call(int n, const bam_pileup1_t *pl, bam_maqcns_t *bm);
-       // return: cns<<28 | cns2<<24 | mapQ<<16 | cnsQ<<8 | cnsQ2
-       uint32_t glf2cns(const glf1_t *g, int q_r);
-
-       bam_maqindel_opt_t *bam_maqindel_opt_init();
-       bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, const bam_pileup1_t *pl, const char *ref,
-                                                                        int _n_types, int *_types);
-       void bam_maqindel_ret_destroy(bam_maqindel_ret_t*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index c6568b770200f4744b4255fc0fc14451c51a001a..50ecaf17cf4aac80a35d46bec11a7d08b987e216 100644 (file)
 #include "kaln.h"
 #include "kprobaln.h"
 
+#define USE_EQUAL 1
+#define DROP_TAG  2
+#define BIN_QUAL  4
+#define UPDATE_NM 8
+#define UPDATE_MD 16
+#define HASH_QNM  32
+
 char bam_nt16_nt4_table[] = { 4, 0, 1, 4, 2, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4 };
 
-void bam_fillmd1_core(bam1_t *b, char *ref, int is_equal, int max_nm)
+int bam_aux_drop_other(bam1_t *b, uint8_t *s);
+
+void bam_fillmd1_core(bam1_t *b, char *ref, int flag, int max_nm)
 {
        uint8_t *seq = bam1_seq(b);
        uint32_t *cigar = bam1_cigar(b);
        bam1_core_t *c = &b->core;
        int i, x, y, u = 0;
        kstring_t *str;
-       uint8_t *old_md, *old_nm;
        int32_t old_nm_i = -1, nm = 0;
 
        str = (kstring_t*)calloc(1, sizeof(kstring_t));
        for (i = y = 0, x = c->pos; i < c->n_cigar; ++i) {
                int j, l = cigar[i]>>4, op = cigar[i]&0xf;
-               if (op == BAM_CMATCH) {
+               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                        for (j = 0; j < l; ++j) {
                                int z = y + j;
                                int c1 = bam1_seqi(seq, z), c2 = bam_nt16_table[(int)ref[x+j]];
                                if (ref[x+j] == 0) break; // out of boundary
                                if ((c1 == c2 && c1 != 15 && c2 != 15) || c1 == 0) { // a match
-                                       if (is_equal) seq[z/2] &= (z&1)? 0xf0 : 0x0f;
+                                       if (flag&USE_EQUAL) seq[z/2] &= (z&1)? 0xf0 : 0x0f;
                                        ++u;
                                } else {
-                                       ksprintf(str, "%d", u);
-                                       kputc(ref[x+j], str);
+                                       kputw(u, str); kputc(ref[x+j], str);
                                        u = 0; ++nm;
                                }
                        }
                        if (j < l) break;
                        x += l; y += l;
                } else if (op == BAM_CDEL) {
-                       ksprintf(str, "%d", u);
-                       kputc('^', str);
+                       kputw(u, str); kputc('^', str);
                        for (j = 0; j < l; ++j) {
                                if (ref[x+j] == 0) break;
                                kputc(ref[x+j], str);
@@ -59,12 +65,12 @@ void bam_fillmd1_core(bam1_t *b, char *ref, int is_equal, int max_nm)
                        x += l;
                }
        }
-       ksprintf(str, "%d", u);
+       kputw(u, str);
        // apply max_nm
        if (max_nm > 0 && nm >= max_nm) {
                for (i = y = 0, x = c->pos; i < c->n_cigar; ++i) {
                        int j, l = cigar[i]>>4, op = cigar[i]&0xf;
-                       if (op == BAM_CMATCH) {
+                       if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                                for (j = 0; j < l; ++j) {
                                        int z = y + j;
                                        int c1 = bam1_seqi(seq, z), c2 = bam_nt16_table[(int)ref[x+j]];
@@ -81,38 +87,54 @@ void bam_fillmd1_core(bam1_t *b, char *ref, int is_equal, int max_nm)
                }
        }
        // update NM
-       old_nm = bam_aux_get(b, "NM");
-       if (c->flag & BAM_FUNMAP) return;
-       if (old_nm) old_nm_i = bam_aux2i(old_nm);
-       if (!old_nm) bam_aux_append(b, "NM", 'i', 4, (uint8_t*)&nm);
-       else if (nm != old_nm_i) {
-               fprintf(pysamerr, "[bam_fillmd1] different NM for read '%s': %d -> %d\n", bam1_qname(b), old_nm_i, nm);
-               bam_aux_del(b, old_nm);
-               bam_aux_append(b, "NM", 'i', 4, (uint8_t*)&nm);
+       if (flag & UPDATE_NM) {
+               uint8_t *old_nm = bam_aux_get(b, "NM");
+               if (c->flag & BAM_FUNMAP) return;
+               if (old_nm) old_nm_i = bam_aux2i(old_nm);
+               if (!old_nm) bam_aux_append(b, "NM", 'i', 4, (uint8_t*)&nm);
+               else if (nm != old_nm_i) {
+                       fprintf(pysamerr, "[bam_fillmd1] different NM for read '%s': %d -> %d\n", bam1_qname(b), old_nm_i, nm);
+                       bam_aux_del(b, old_nm);
+                       bam_aux_append(b, "NM", 'i', 4, (uint8_t*)&nm);
+               }
        }
        // update MD
-       old_md = bam_aux_get(b, "MD");
-       if (!old_md) bam_aux_append(b, "MD", 'Z', str->l + 1, (uint8_t*)str->s);
-       else {
-               int is_diff = 0;
-               if (strlen((char*)old_md+1) == str->l) {
-                       for (i = 0; i < str->l; ++i)
-                               if (toupper(old_md[i+1]) != toupper(str->s[i]))
-                                       break;
-                       if (i < str->l) is_diff = 1;
-               } else is_diff = 1;
-               if (is_diff) {
-                       fprintf(pysamerr, "[bam_fillmd1] different MD for read '%s': '%s' -> '%s'\n", bam1_qname(b), old_md+1, str->s);
-                       bam_aux_del(b, old_md);
-                       bam_aux_append(b, "MD", 'Z', str->l + 1, (uint8_t*)str->s);
+       if (flag & UPDATE_MD) {
+               uint8_t *old_md = bam_aux_get(b, "MD");
+               if (c->flag & BAM_FUNMAP) return;
+               if (!old_md) bam_aux_append(b, "MD", 'Z', str->l + 1, (uint8_t*)str->s);
+               else {
+                       int is_diff = 0;
+                       if (strlen((char*)old_md+1) == str->l) {
+                               for (i = 0; i < str->l; ++i)
+                                       if (toupper(old_md[i+1]) != toupper(str->s[i]))
+                                               break;
+                               if (i < str->l) is_diff = 1;
+                       } else is_diff = 1;
+                       if (is_diff) {
+                               fprintf(pysamerr, "[bam_fillmd1] different MD for read '%s': '%s' -> '%s'\n", bam1_qname(b), old_md+1, str->s);
+                               bam_aux_del(b, old_md);
+                               bam_aux_append(b, "MD", 'Z', str->l + 1, (uint8_t*)str->s);
+                       }
                }
        }
+       // drop all tags but RG
+       if (flag&DROP_TAG) {
+               uint8_t *q = bam_aux_get(b, "RG");
+               bam_aux_drop_other(b, q);
+       }
+       // reduce the resolution of base quality
+       if (flag&BIN_QUAL) {
+               uint8_t *qual = bam1_qual(b);
+               for (i = 0; i < b->core.l_qseq; ++i)
+                       if (qual[i] >= 3) qual[i] = qual[i]/10*10 + 7;
+       }
        free(str->s); free(str);
 }
 
-void bam_fillmd1(bam1_t *b, char *ref, int is_equal)
+void bam_fillmd1(bam1_t *b, char *ref, int flag)
 {
-       bam_fillmd1_core(b, ref, is_equal, 0);
+       bam_fillmd1_core(b, ref, flag, 0);
 }
 
 int bam_cap_mapQ(bam1_t *b, char *ref, int thres)
@@ -126,7 +148,7 @@ int bam_cap_mapQ(bam1_t *b, char *ref, int thres)
        mm = q = len = clip_l = clip_q = 0;
        for (i = y = 0, x = c->pos; i < c->n_cigar; ++i) {
                int j, l = cigar[i]>>4, op = cigar[i]&0xf;
-               if (op == BAM_CMATCH) {
+               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                        for (j = 0; j < l; ++j) {
                                int z = y + j;
                                int c1 = bam1_seqi(seq, z), c2 = bam_nt16_table[(int)ref[x+j]];
@@ -199,7 +221,7 @@ int bam_prob_realn_core(bam1_t *b, const char *ref, int flag)
        for (k = 0; k < c->n_cigar; ++k) {
                int op, l;
                op = cigar[k]&0xf; l = cigar[k]>>4;
-               if (op == BAM_CMATCH) {
+               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                        if (yb < 0) yb = y;
                        if (xb < 0) xb = x;
                        ye = y + l; xe = x + l;
@@ -235,7 +257,7 @@ int bam_prob_realn_core(bam1_t *b, const char *ref, int flag)
                if (!extend_baq) { // in this block, bq[] is capped by base quality qual[]
                        for (k = 0, x = c->pos, y = 0; k < c->n_cigar; ++k) {
                                int op = cigar[k]&0xf, l = cigar[k]>>4;
-                               if (op == BAM_CMATCH) {
+                               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                                        for (i = y; i < y + l; ++i) {
                                                if ((state[i]&3) != 0 || state[i]>>2 != x - xb + (i - y)) bq[i] = 0;
                                                else bq[i] = bq[i] < q[i]? bq[i] : q[i];
@@ -250,7 +272,7 @@ int bam_prob_realn_core(bam1_t *b, const char *ref, int flag)
                        left = calloc(c->l_qseq, 1); rght = calloc(c->l_qseq, 1);
                        for (k = 0, x = c->pos, y = 0; k < c->n_cigar; ++k) {
                                int op = cigar[k]&0xf, l = cigar[k]>>4;
-                               if (op == BAM_CMATCH) {
+                               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                                        for (i = y; i < y + l; ++i)
                                                bq[i] = ((state[i]&3) != 0 || state[i]>>2 != x - xb + (i - y))? 0 : q[i];
                                        for (left[y] = bq[y], i = y + 1; i < y + l; ++i)
@@ -282,19 +304,24 @@ int bam_prob_realn(bam1_t *b, const char *ref)
 
 int bam_fillmd(int argc, char *argv[])
 {
-       int c, is_equal, tid = -2, ret, len, is_bam_out, is_sam_in, is_uncompressed, max_nm, is_realn, capQ, baq_flag;
+       int c, flt_flag, tid = -2, ret, len, is_bam_out, is_sam_in, is_uncompressed, max_nm, is_realn, capQ, baq_flag;
        samfile_t *fp, *fpout = 0;
        faidx_t *fai;
        char *ref = 0, mode_w[8], mode_r[8];
        bam1_t *b;
 
-       is_equal = is_bam_out = is_sam_in = is_uncompressed = is_realn = max_nm = capQ = baq_flag = 0;
+       flt_flag = UPDATE_NM | UPDATE_MD;
+       is_bam_out = is_sam_in = is_uncompressed = is_realn = max_nm = capQ = baq_flag = 0;
        mode_w[0] = mode_r[0] = 0;
        strcpy(mode_r, "r"); strcpy(mode_w, "w");
-       while ((c = getopt(argc, argv, "EreubSC:n:A")) >= 0) {
+       while ((c = getopt(argc, argv, "EqreuNhbSC:n:Ad")) >= 0) {
                switch (c) {
                case 'r': is_realn = 1; break;
-               case 'e': is_equal = 1; break;
+               case 'e': flt_flag |= USE_EQUAL; break;
+               case 'd': flt_flag |= DROP_TAG; break;
+               case 'q': flt_flag |= BIN_QUAL; break;
+               case 'h': flt_flag |= HASH_QNM; break;
+               case 'N': flt_flag &= ~(UPDATE_MD|UPDATE_NM); break;
                case 'b': is_bam_out = 1; break;
                case 'u': is_uncompressed = is_bam_out = 1; break;
                case 'S': is_sam_in = 1; break;
@@ -346,7 +373,7 @@ int bam_fillmd(int argc, char *argv[])
                                int q = bam_cap_mapQ(b, ref, capQ);
                                if (b->core.qual > q) b->core.qual = q;
                        }
-                       if (ref) bam_fillmd1_core(b, ref, is_equal, max_nm);
+                       if (ref) bam_fillmd1_core(b, ref, flt_flag, max_nm);
                }
                samwrite(fpout, b);
        }
index 59e54c06ad77434947311a94bd0cd9b5b44b6b52..cca29d2e075120e9ebf3b4170d82b2f5929cac55 100644 (file)
@@ -80,12 +80,12 @@ static inline int resolve_cigar2(bam_pileup1_t *p, uint32_t pos, cstate_t *s)
        if (s->k == -1) { // never processed
                is_head = 1;
                if (c->n_cigar == 1) { // just one operation, save a loop
-                       if (_cop(cigar[0]) == BAM_CMATCH) s->k = 0, s->x = c->pos, s->y = 0;
+                 if (_cop(cigar[0]) == BAM_CMATCH || _cop(cigar[0]) == BAM_CEQUAL || _cop(cigar[0]) == BAM_CDIFF) s->k = 0, s->x = c->pos, s->y = 0;
                } else { // find the first match or deletion
                        for (k = 0, s->x = c->pos, s->y = 0; k < c->n_cigar; ++k) {
                                int op = _cop(cigar[k]);
                                int l = _cln(cigar[k]);
-                               if (op == BAM_CMATCH || op == BAM_CDEL) break;
+                               if (op == BAM_CMATCH || op == BAM_CDEL || op == BAM_CEQUAL || op == BAM_CDIFF) break;
                                else if (op == BAM_CREF_SKIP) s->x += l;
                                else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) s->y += l;
                        }
@@ -97,16 +97,16 @@ static inline int resolve_cigar2(bam_pileup1_t *p, uint32_t pos, cstate_t *s)
                if (pos - s->x >= l) { // jump to the next operation
                        assert(s->k < c->n_cigar); // otherwise a bug: this function should not be called in this case
                        op = _cop(cigar[s->k+1]);
-                       if (op == BAM_CMATCH || op == BAM_CDEL || op == BAM_CREF_SKIP) { // jump to the next without a loop
-                               if (_cop(cigar[s->k]) == BAM_CMATCH) s->y += l;
+                       if (op == BAM_CMATCH || op == BAM_CDEL || op == BAM_CREF_SKIP || op == BAM_CEQUAL || op == BAM_CDIFF) { // jump to the next without a loop
+                         if (_cop(cigar[s->k]) == BAM_CMATCH|| _cop(cigar[s->k]) == BAM_CEQUAL || _cop(cigar[s->k]) == BAM_CDIFF) s->y += l;
                                s->x += l;
                                ++s->k;
-                       } else { // find the next M/D/N
-                               if (_cop(cigar[s->k]) == BAM_CMATCH) s->y += l;
+                       } else { // find the next M/D/N/=/X
+                         if (_cop(cigar[s->k]) == BAM_CMATCH|| _cop(cigar[s->k]) == BAM_CEQUAL || _cop(cigar[s->k]) == BAM_CDIFF) s->y += l;
                                s->x += l;
                                for (k = s->k + 1; k < c->n_cigar; ++k) {
                                        op = _cop(cigar[k]), l = _cln(cigar[k]);
-                                       if (op == BAM_CMATCH || op == BAM_CDEL || op == BAM_CREF_SKIP) break;
+                                       if (op == BAM_CMATCH || op == BAM_CDEL || op == BAM_CREF_SKIP || op == BAM_CEQUAL || op == BAM_CDIFF) break;
                                        else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) s->y += l;
                                }
                                s->k = k;
@@ -128,12 +128,12 @@ static inline int resolve_cigar2(bam_pileup1_t *p, uint32_t pos, cstate_t *s)
                                for (k = s->k + 2; k < c->n_cigar; ++k) {
                                        op2 = _cop(cigar[k]); l2 = _cln(cigar[k]);
                                        if (op2 == BAM_CINS) l3 += l2;
-                                       else if (op2 == BAM_CDEL || op2 == BAM_CMATCH || op2 == BAM_CREF_SKIP) break;
+                                       else if (op2 == BAM_CDEL || op2 == BAM_CMATCH || op2 == BAM_CREF_SKIP || op2 == BAM_CEQUAL || op2 == BAM_CDIFF) break;
                                }
                                if (l3 > 0) p->indel = l3;
                        }
                }
-               if (op == BAM_CMATCH) {
+               if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
                        p->qpos = s->y + (pos - s->x);
                } else if (op == BAM_CDEL || op == BAM_CREF_SKIP) {
                        p->is_del = 1; p->qpos = s->y; // FIXME: distinguish D and N!!!!!
index 93b729db2388b9ef14ba093c2eef7b31dee52663..473d409633dd80836c0ffccedb00c31fa1246e16 100644 (file)
@@ -8,93 +8,8 @@
 #include <errno.h>
 #include "sam.h"
 #include "faidx.h"
-#include "bam_maqcns.h"
-#include "khash.h"
-#include "glf.h"
 #include "kstring.h"
 
-typedef int *indel_list_t;
-KHASH_MAP_INIT_INT64(64, indel_list_t)
-
-#define BAM_PLF_SIMPLE     0x01
-#define BAM_PLF_CNS        0x02
-#define BAM_PLF_INDEL_ONLY 0x04
-#define BAM_PLF_GLF        0x08
-#define BAM_PLF_VAR_ONLY   0x10
-#define BAM_PLF_2ND        0x20
-#define BAM_PLF_RANBASE    0x40
-#define BAM_PLF_1STBASE    0x80
-#define BAM_PLF_ALLBASE    0x100
-#define BAM_PLF_READPOS    0x200
-#define BAM_PLF_NOBAQ      0x400
-
-typedef struct {
-       bam_header_t *h;
-       bam_maqcns_t *c;
-       bam_maqindel_opt_t *ido;
-       faidx_t *fai;
-       khash_t(64) *hash;
-       uint32_t format;
-       int tid, len, last_pos;
-       int mask;
-       int capQ_thres, min_baseQ;
-    int max_depth;  // for indel calling, ignore reads with the depth too high. 0 for unlimited
-       char *ref;
-       glfFile fp_glf; // for glf output only
-} pu_data_t;
-
-char **__bam_get_lines(const char *fn, int *_n);
-void bam_init_header_hash(bam_header_t *header);
-int32_t bam_get_tid(const bam_header_t *header, const char *seq_name);
-
-static khash_t(64) *load_pos(const char *fn, bam_header_t *h)
-{
-       char **list;
-       int i, j, n, *fields, max_fields;
-       khash_t(64) *hash;
-       bam_init_header_hash(h);
-       list = __bam_get_lines(fn, &n);
-       hash = kh_init(64);
-       max_fields = 0; fields = 0;
-       for (i = 0; i < n; ++i) {
-               char *str = list[i];
-               int chr, n_fields, ret;
-               khint_t k;
-               uint64_t x;
-               n_fields = ksplit_core(str, 0, &max_fields, &fields);
-               if (n_fields < 2) continue;
-               chr = bam_get_tid(h, str + fields[0]);
-               if (chr < 0) {
-                       fprintf(pysamerr, "[load_pos] unknown reference sequence name: %s\n", str + fields[0]);
-                       continue;
-               }
-               x = (uint64_t)chr << 32 | (atoi(str + fields[1]) - 1);
-               k = kh_put(64, hash, x, &ret);
-               if (ret == 0) {
-                       fprintf(pysamerr, "[load_pos] position %s:%s has been loaded.\n", str+fields[0], str+fields[1]);
-                       continue;
-               }
-               kh_val(hash, k) = 0;
-               if (n_fields > 2) {
-                       // count
-                       for (j = 2; j < n_fields; ++j) {
-                               char *s = str + fields[j];
-                               if ((*s != '+' && *s != '-') || !isdigit(s[1])) break;
-                       }
-                       if (j > 2) { // update kh_val()
-                               int *q, y, z;
-                               q = kh_val(hash, k) = (int*)calloc(j - 1, sizeof(int));
-                               q[0] = j - 2; z = j; y = 1;
-                               for (j = 2; j < z; ++j)
-                                       q[y++] = atoi(str + fields[j]);
-                       }
-               }
-               free(str);
-       }
-       free(list); free(fields);
-       return hash;
-}
-
 static inline int printw(int c, FILE *fp)
 {
        char buf[16];
@@ -110,75 +25,6 @@ static inline int printw(int c, FILE *fp)
        return 0;
 }
 
-// an analogy to pileup_func() below
-static int glt3_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pu, void *data)
-{
-       pu_data_t *d = (pu_data_t*)data;
-       bam_maqindel_ret_t *r = 0;
-       int rb, *proposed_indels = 0;
-       glf1_t *g;
-       glf3_t *g3;
-
-       if (d->fai == 0) {
-               fprintf(pysamerr, "[glt3_func] reference sequence is required for generating GLT. Abort!\n");
-               exit(1);
-       }
-       if (d->hash) { // only output a list of sites
-               khint_t k = kh_get(64, d->hash, (uint64_t)tid<<32|pos);
-               if (k == kh_end(d->hash)) return 0;
-               proposed_indels = kh_val(d->hash, k);
-       }
-       g3 = glf3_init1();
-       if (d->fai && (int)tid != d->tid) {
-               if (d->ref) { // then write the end mark
-                       g3->rtype = GLF3_RTYPE_END;
-                       glf3_write1(d->fp_glf, g3);
-               }
-               glf3_ref_write(d->fp_glf, d->h->target_name[tid], d->h->target_len[tid]); // write reference
-               free(d->ref);
-               d->ref = fai_fetch(d->fai, d->h->target_name[tid], &d->len);
-               d->tid = tid;
-               d->last_pos = 0;
-       }
-       rb = (d->ref && (int)pos < d->len)? d->ref[pos] : 'N';
-       g = bam_maqcns_glfgen(n, pu, bam_nt16_table[rb], d->c);
-       memcpy(g3, g, sizeof(glf1_t));
-       g3->rtype = GLF3_RTYPE_SUB;
-       g3->offset = pos - d->last_pos;
-       d->last_pos = pos;
-       glf3_write1(d->fp_glf, g3);
-    if (pos < d->len) {
-        int m = (!d->max_depth || d->max_depth>n) ? n : d->max_depth;
-               if (proposed_indels)
-                       r = bam_maqindel(m, pos, d->ido, pu, d->ref, proposed_indels[0], proposed_indels+1);
-               else r = bam_maqindel(m, pos, d->ido, pu, d->ref, 0, 0);
-       }
-       if (r) { // then write indel line
-               int het = 3 * n, min;
-               min = het;
-               if (min > r->gl[0]) min = r->gl[0];
-               if (min > r->gl[1]) min = r->gl[1];
-               g3->ref_base = 0;
-               g3->rtype = GLF3_RTYPE_INDEL;
-               memset(g3->lk, 0, 10);
-               g3->lk[0] = r->gl[0] - min < 255? r->gl[0] - min : 255;
-               g3->lk[1] = r->gl[1] - min < 255? r->gl[1] - min : 255;
-               g3->lk[2] = het - min < 255? het - min : 255;
-               g3->offset = 0;
-               g3->indel_len[0] = r->indel1;
-               g3->indel_len[1] = r->indel2;
-               g3->min_lk = min < 255? min : 255;
-               g3->max_len = (abs(r->indel1) > abs(r->indel2)? abs(r->indel1) : abs(r->indel2)) + 1;
-               g3->indel_seq[0] = strdup(r->s[0]+1);
-               g3->indel_seq[1] = strdup(r->s[1]+1);
-               glf3_write1(d->fp_glf, g3);
-               bam_maqindel_ret_destroy(r);
-       }
-       free(g);
-       glf3_destroy1(g3);
-       return 0;
-}
-
 static inline void pileup_seq(const bam_pileup1_t *p, int pos, int ref_len, const char *ref)
 {
        int j;
@@ -214,317 +60,6 @@ static inline void pileup_seq(const bam_pileup1_t *p, int pos, int ref_len, cons
        if (p->is_tail) putchar('$');
 }
 
-static int pileup_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pu, void *data)
-{
-       pu_data_t *d = (pu_data_t*)data;
-       bam_maqindel_ret_t *r = 0;
-       int i, rb, rms_mapq = -1, *proposed_indels = 0;
-       uint64_t rms_aux;
-       uint32_t cns = 0;
-
-       // if GLF is required, suppress -c completely
-       if (d->format & BAM_PLF_GLF) return glt3_func(tid, pos, n, pu, data);
-       // if d->hash is initialized, only output the sites in the hash table
-       if (d->hash) {
-               khint_t k = kh_get(64, d->hash, (uint64_t)tid<<32|pos);
-               if (k == kh_end(d->hash)) return 0;
-               proposed_indels = kh_val(d->hash, k);
-       }
-       // update d->ref if necessary
-       if (d->fai && (int)tid != d->tid) {
-               free(d->ref);
-               d->ref = faidx_fetch_seq(d->fai, d->h->target_name[tid], 0, 0x7fffffff, &d->len);
-               d->tid = tid;
-       }
-       rb = (d->ref && (int)pos < d->len)? d->ref[pos] : 'N';
-       // when the indel-only mode is asked for, return if no reads mapped with indels
-       if (d->format & BAM_PLF_INDEL_ONLY) {
-               for (i = 0; i < n; ++i)
-                       if (pu[i].indel != 0) break;
-               if (i == n) return 0;
-       }
-       // call the consensus and indel
-       if (d->format & BAM_PLF_CNS) { // call consensus
-               if (d->format & (BAM_PLF_RANBASE|BAM_PLF_1STBASE)) { // use a random base or the 1st base as the consensus call
-                       const bam_pileup1_t *p = (d->format & BAM_PLF_1STBASE)? pu : pu + (int)(drand48() * n);
-                       int q = bam1_qual(p->b)[p->qpos];
-                       int mapQ = p->b->core.qual < d->c->cap_mapQ? p->b->core.qual : d->c->cap_mapQ;
-                       uint32_t b = bam1_seqi(bam1_seq(p->b), p->qpos);
-                       cns = b<<28 | 0xf<<24 | mapQ<<16 | q<<8;
-               } else if (d->format & BAM_PLF_ALLBASE) { // collapse all bases
-                       uint64_t rmsQ = 0;
-                       uint32_t b = 0;
-                       for (i = 0; i < n; ++i) {
-                               const bam_pileup1_t *p = pu + i;
-                               int q = p->b->core.qual < d->c->cap_mapQ? p->b->core.qual : d->c->cap_mapQ;
-                               b |= bam1_seqi(bam1_seq(p->b), p->qpos);
-                               rmsQ += q * q;
-                       }
-                       rmsQ = (uint64_t)(sqrt((double)rmsQ / n) + .499);
-                       cns = b<<28 | 0xf<<24 | rmsQ<<16 | 60<<8;
-               } else {
-                       glf1_t *g = bam_maqcns_glfgen(n, pu, bam_nt16_table[rb], d->c);
-                       cns = g->depth == 0? (0xfu<<28 | 0xf<<24) : glf2cns(g, (int)(d->c->q_r + .499));
-                       free(g);
-               }
-       }
-    if ((d->format & (BAM_PLF_CNS|BAM_PLF_INDEL_ONLY)) && d->ref && pos < d->len) { // call indels
-        int m = (!d->max_depth || d->max_depth>n) ? n : d->max_depth;
-        if (proposed_indels) // the first element gives the size of the array
-            r = bam_maqindel(m, pos, d->ido, pu, d->ref, proposed_indels[0], proposed_indels+1);
-        else r = bam_maqindel(m, pos, d->ido, pu, d->ref, 0, 0);
-       }
-       // when only variant sites are asked for, test if the site is a variant
-       if ((d->format & BAM_PLF_CNS) && (d->format & BAM_PLF_VAR_ONLY)) {
-               if (!(bam_nt16_table[rb] != 15 && cns>>28 != 15 && cns>>28 != bam_nt16_table[rb])) { // not a SNP
-                       if (!(r && (r->gt == 2 || strcmp(r->s[r->gt], "*")))) { // not an indel
-                               if (r) bam_maqindel_ret_destroy(r);
-                               return 0;
-                       }
-               }
-       }
-       // print the first 3 columns
-       fputs(d->h->target_name[tid], stdout); putchar('\t');
-       printw(pos+1, stdout); putchar('\t'); putchar(rb); putchar('\t');
-       // print consensus information if required
-       if (d->format & BAM_PLF_CNS) {
-               putchar(bam_nt16_rev_table[cns>>28]); putchar('\t');
-               printw(cns>>8&0xff, stdout); putchar('\t');
-               printw(cns&0xff, stdout); putchar('\t');
-               printw(cns>>16&0xff, stdout); putchar('\t');
-       }
-       // print pileup sequences
-       printw(n, stdout); putchar('\t');
-       for (i = 0; i < n; ++i)
-               pileup_seq(pu + i, pos, d->len, d->ref);
-       // finalize rms_mapq
-       if (d->format & BAM_PLF_CNS) {
-               for (i = rms_aux = 0; i < n; ++i) {
-                       const bam_pileup1_t *p = pu + i;
-                       int tmp = p->b->core.qual < d->c->cap_mapQ? p->b->core.qual : d->c->cap_mapQ;
-                       rms_aux += tmp * tmp;
-               }
-               rms_aux = (uint64_t)(sqrt((double)rms_aux / n) + .499);
-               if (rms_mapq < 0) rms_mapq = rms_aux;
-       }
-       putchar('\t');
-       // print quality
-       for (i = 0; i < n; ++i) {
-               const bam_pileup1_t *p = pu + i;
-               int c = bam1_qual(p->b)[p->qpos] + 33;
-               if (c > 126) c = 126;
-               putchar(c);
-       }
-       if (d->format & BAM_PLF_2ND) { // print 2nd calls and qualities
-               const unsigned char *q;
-               putchar('\t');
-               for (i = 0; i < n; ++i) {
-                       const bam_pileup1_t *p = pu + i;
-                       q = bam_aux_get(p->b, "E2");
-                       putchar(q? q[p->qpos + 1] : 'N');
-               }
-               putchar('\t');
-               for (i = 0; i < n; ++i) {
-                       const bam_pileup1_t *p = pu + i;
-                       q = bam_aux_get(p->b, "U2");
-                       putchar(q? q[p->qpos + 1] : '!');
-               }
-       }
-       // print mapping quality if -s is flagged on the command line
-       if (d->format & BAM_PLF_SIMPLE) {
-               putchar('\t');
-               for (i = 0; i < n; ++i) {
-                       int c = pu[i].b->core.qual + 33;
-                       if (c > 126) c = 126;
-                       putchar(c);
-               }
-       }
-       // print read position
-       if (d->format & BAM_PLF_READPOS) {
-               putchar('\t');
-               for (i = 0; i < n; ++i) {
-                       int x = pu[i].qpos;
-                       int l = pu[i].b->core.l_qseq;
-                       printw(x < l/2? x+1 : -((l-1)-x+1), stdout); putchar(',');
-               }
-       }
-       putchar('\n');
-       // print the indel line if r has been calculated. This only happens if:
-       // a) -c or -i are flagged, AND b) the reference sequence is available
-       if (r) {
-               printf("%s\t%d\t*\t", d->h->target_name[tid], pos + 1);
-               if (r->gt < 2) printf("%s/%s\t", r->s[r->gt], r->s[r->gt]);
-               else printf("%s/%s\t", r->s[0], r->s[1]);
-               printf("%d\t%d\t", r->q_cns, r->q_ref);
-               printf("%d\t%d\t", rms_mapq, n);
-               printf("%s\t%s\t", r->s[0], r->s[1]);
-               //printf("%d\t%d\t", r->gl[0], r->gl[1]);
-               printf("%d\t%d\t%d\t", r->cnt1, r->cnt2, r->cnt_anti);
-               printf("%d\t%d\n", r->cnt_ref, r->cnt_ambi);
-               bam_maqindel_ret_destroy(r);
-       }
-       return 0;
-}
-
-int bam_pileup(int argc, char *argv[])
-{
-       int c, is_SAM = 0;
-       char *fn_list = 0, *fn_fa = 0, *fn_pos = 0;
-       pu_data_t *d = (pu_data_t*)calloc(1, sizeof(pu_data_t));
-    d->max_depth = 1024; d->tid = -1; d->mask = BAM_DEF_MASK; d->min_baseQ = 13;
-       d->c = bam_maqcns_init();
-       d->c->errmod = BAM_ERRMOD_MAQ2; // change the default model
-       d->ido = bam_maqindel_opt_init();
-       while ((c = getopt(argc, argv, "st:f:cT:N:r:l:d:im:gI:G:vM:S2aR:PAQ:C:B")) >= 0) {
-               switch (c) {
-               case 'Q': d->c->min_baseQ = atoi(optarg); break;
-               case 'C': d->capQ_thres = atoi(optarg); break;
-               case 'B': d->format |= BAM_PLF_NOBAQ; break;
-               case 'a': d->c->errmod = BAM_ERRMOD_SOAP; break;
-               case 'A': d->c->errmod = BAM_ERRMOD_MAQ; break;
-               case 's': d->format |= BAM_PLF_SIMPLE; break;
-               case 't': fn_list = strdup(optarg); break;
-               case 'l': fn_pos = strdup(optarg); break;
-               case 'f': fn_fa = strdup(optarg); break;
-               case 'T': d->c->theta = atof(optarg); break;
-               case 'N': d->c->n_hap = atoi(optarg); break;
-               case 'r': d->c->het_rate = atof(optarg); d->ido->r_snp = d->c->het_rate; break;
-               case 'M': d->c->cap_mapQ = atoi(optarg); break;
-               case 'd': d->max_depth = atoi(optarg); break;
-               case 'c': d->format |= BAM_PLF_CNS; break;
-               case 'i': d->format |= BAM_PLF_INDEL_ONLY; break;
-               case 'v': d->format |= BAM_PLF_VAR_ONLY; break;
-               case 'm': d->mask = strtol(optarg, 0, 0); break;
-               case 'g': d->format |= BAM_PLF_GLF; break;
-               case '2': d->format |= BAM_PLF_2ND; break;
-               case 'P': d->format |= BAM_PLF_READPOS; break;
-               case 'I': d->ido->q_indel = atoi(optarg); break;
-               case 'G': d->ido->r_indel = atof(optarg); break;
-               case 'S': is_SAM = 1; break;
-               case 'R':
-                       if (strcmp(optarg, "random") == 0) d->format |= BAM_PLF_RANBASE;
-                       else if (strcmp(optarg, "first") == 0) d->format |= BAM_PLF_1STBASE;
-                       else if (strcmp(optarg, "all") == 0) d->format |= BAM_PLF_ALLBASE;
-                       else fprintf(pysamerr, "[bam_pileup] unrecognized -R\n");
-                       break;
-               default: fprintf(pysamerr, "Unrecognizd option '-%c'.\n", c); return 1;
-               }
-       }
-       if (d->c->errmod != BAM_ERRMOD_MAQ2) d->c->theta += 0.02;
-       if (d->c->theta > 1.0) d->c->theta = 1.0;
-       if (fn_list) is_SAM = 1;
-       if (optind == argc) {
-               fprintf(pysamerr, "\n");
-               fprintf(pysamerr, "Usage:  samtools pileup [options] <in.bam>|<in.sam>\n\n");
-               fprintf(pysamerr, "Option: -s        simple (yet incomplete) pileup format\n");
-               fprintf(pysamerr, "        -S        the input is in SAM\n");
-               fprintf(pysamerr, "        -B        disable BAQ computation\n");
-               fprintf(pysamerr, "        -A        use the original MAQ model for SNP calling (DEPRECATED)\n");
-               fprintf(pysamerr, "        -2        output the 2nd best call and quality\n");
-               fprintf(pysamerr, "        -i        only show lines/consensus with indels\n");
-               fprintf(pysamerr, "        -Q INT    min base quality (possibly capped by BAQ) [%d]\n", d->c->min_baseQ);
-               fprintf(pysamerr, "        -C INT    coefficient for adjusting mapQ of poor mappings [%d]\n", d->capQ_thres);
-               fprintf(pysamerr, "        -m INT    filtering reads with bits in INT [0x%x]\n", d->mask);
-               fprintf(pysamerr, "        -M INT    cap mapping quality at INT [%d]\n", d->c->cap_mapQ);
-        fprintf(pysamerr, "        -d INT    limit maximum depth for indels [%d]\n", d->max_depth);
-               fprintf(pysamerr, "        -t FILE   list of reference sequences (force -S)\n");
-               fprintf(pysamerr, "        -l FILE   list of sites at which pileup is output\n");
-               fprintf(pysamerr, "        -f FILE   reference sequence in the FASTA format\n\n");
-               fprintf(pysamerr, "        -c        compute the consensus sequence\n");
-               fprintf(pysamerr, "        -v        print variants only (for -c)\n");
-               fprintf(pysamerr, "        -g        output in the GLFv3 format (DEPRECATED)\n");
-               fprintf(pysamerr, "        -T FLOAT  theta in maq consensus calling model (for -c) [%.4g]\n", d->c->theta);
-               fprintf(pysamerr, "        -N INT    number of haplotypes in the sample (for -c) [%d]\n", d->c->n_hap);
-               fprintf(pysamerr, "        -r FLOAT  prior of a difference between two haplotypes (for -c) [%.4g]\n", d->c->het_rate);
-               fprintf(pysamerr, "        -G FLOAT  prior of an indel between two haplotypes (for -c) [%.4g]\n", d->ido->r_indel);
-               fprintf(pysamerr, "        -I INT    phred prob. of an indel in sequencing/prep. (for -c) [%d]\n", d->ido->q_indel);
-               fprintf(pysamerr, "\n");
-               fprintf(pysamerr, "Warning: Please use the `mpileup' command instead `pileup'. `Pileup' is deprecated!\n\n");
-               free(fn_list); free(fn_fa); free(d);
-               return 1;
-       }
-       if (d->format & (BAM_PLF_RANBASE|BAM_PLF_1STBASE|BAM_PLF_ALLBASE)) d->format |= BAM_PLF_CNS;
-       if (fn_fa) d->fai = fai_load(fn_fa);
-       if (d->format & (BAM_PLF_CNS|BAM_PLF_GLF)) bam_maqcns_prepare(d->c); // consensus calling
-       if (d->format & BAM_PLF_GLF) { // for glf output
-               glf3_header_t *h;
-               h = glf3_header_init();
-               d->fp_glf = bgzf_fdopen(fileno(stdout), "w");
-               glf3_header_write(d->fp_glf, h);
-               glf3_header_destroy(h);
-       }
-       if (d->fai == 0 && (d->format & (BAM_PLF_CNS|BAM_PLF_INDEL_ONLY)))
-               fprintf(pysamerr, "[bam_pileup] indels will not be called when -f is absent.\n");
-       if (fn_fa && is_SAM && fn_list == 0) fn_list = samfaipath(fn_fa);
-
-       {
-               samfile_t *fp;
-               fp = is_SAM? samopen(argv[optind], "r", fn_list) : samopen(argv[optind], "rb", 0);
-               if (fp == 0 || fp->header == 0) {
-                       fprintf(pysamerr, "[bam_pileup] fail to read the header: non-exisiting file or wrong format.\n");
-                       return 1;
-               }
-               d->h = fp->header;
-               if (fn_pos) d->hash = load_pos(fn_pos, d->h);
-               { // run pileup
-                       extern int bam_prob_realn(bam1_t *b, const char *ref);
-                       extern int bam_cap_mapQ(bam1_t *b, char *ref, int thres);
-                       bam1_t *b;
-                       int ret, tid, pos, n_plp;
-                       bam_plp_t iter;
-                       const bam_pileup1_t *plp;
-                       b = bam_init1();
-                       iter = bam_plp_init(0, 0);
-                       bam_plp_set_mask(iter, d->mask);
-                       while ((ret = samread(fp, b)) >= 0) {
-                               int skip = 0;
-                               if ((int)b->core.tid < 0) break;
-                               // update d->ref if necessary
-                               if (d->fai && (int)b->core.tid != d->tid) {
-                                       free(d->ref);
-                                       d->ref = faidx_fetch_seq(d->fai, d->h->target_name[b->core.tid], 0, 0x7fffffff, &d->len);
-                                       d->tid = b->core.tid;
-                               }
-                               if (d->ref && (d->format&BAM_PLF_CNS) && !(d->format&BAM_PLF_NOBAQ)) bam_prob_realn(b, d->ref);
-                               if (d->ref && (d->format&BAM_PLF_CNS) && d->capQ_thres > 10) {
-                                       int q = bam_cap_mapQ(b, d->ref, d->capQ_thres);
-                                       if (q < 0) skip = 1;
-                                       else if (b->core.qual > q) b->core.qual = q;
-                               } else if (b->core.flag&BAM_FUNMAP) skip = 1;
-                               else if ((d->format&BAM_PLF_CNS) && (b->core.flag&1) && !(b->core.flag&2)) skip = 1;
-                               if (skip) continue;
-                               bam_plp_push(iter, b);
-                               while ((plp = bam_plp_next(iter, &tid, &pos, &n_plp)) != 0)
-                                       pileup_func(tid, pos, n_plp, plp, d);
-                       }
-                       bam_plp_push(iter, 0);
-                       while ((plp = bam_plp_next(iter, &tid, &pos, &n_plp)) != 0)
-                               pileup_func(tid, pos, n_plp, plp, d);
-                       bam_plp_destroy(iter);
-                       bam_destroy1(b);
-               }
-               samclose(fp); // d->h will be destroyed here
-       }
-
-       // free
-       if (d->format & BAM_PLF_GLF) bgzf_close(d->fp_glf);
-       if (fn_pos) { // free the hash table
-               khint_t k;
-               for (k = kh_begin(d->hash); k < kh_end(d->hash); ++k)
-                       if (kh_exist(d->hash, k)) free(kh_val(d->hash, k));
-               kh_destroy(64, d->hash);
-       }
-       free(fn_pos); free(fn_list); free(fn_fa);
-       if (d->fai) fai_destroy(d->fai);
-       bam_maqcns_destroy(d->c);
-       free(d->ido); free(d->ref); free(d);
-       return 0;
-}
-
-/***********
- * mpileup *
- ***********/
-
 #include <assert.h>
 #include "bam2bcf.h"
 #include "sample.h"
@@ -538,6 +73,9 @@ int bam_pileup(int argc, char *argv[])
 #define MPLP_NO_INDEL 0x400
 #define MPLP_EXT_BAQ 0x800
 #define MPLP_ILLUMINA13 0x1000
+#define MPLP_IGNORE_RG 0x2000
+#define MPLP_PRINT_POS 0x4000
+#define MPLP_PRINT_MAPQ 0x8000
 
 void *bed_read(const char *fn);
 void bed_destroy(void *_h);
@@ -612,7 +150,7 @@ static int mplp_func(void *data, bam1_t *b)
 }
 
 static void group_smpl(mplp_pileup_t *m, bam_sample_t *sm, kstring_t *buf,
-                                          int n, char *const*fn, int *n_plp, const bam_pileup1_t **plp)
+                                          int n, char *const*fn, int *n_plp, const bam_pileup1_t **plp, int ignore_rg)
 {
        int i, j;
        memset(m->n_plp, 0, m->n * sizeof(int));
@@ -621,7 +159,7 @@ static void group_smpl(mplp_pileup_t *m, bam_sample_t *sm, kstring_t *buf,
                        const bam_pileup1_t *p = plp[i] + j;
                        uint8_t *q;
                        int id = -1;
-                       q = bam_aux_get(p->b, "RG");
+                       q = ignore_rg? 0 : bam_aux_get(p->b, "RG");
                        if (q) id = bam_smpl_rg2smid(sm, fn[i], (char*)q+1, buf);
                        if (id < 0) id = bam_smpl_rg2smid(sm, fn[i], 0, buf);
                        if (id < 0 || id >= m->n) {
@@ -643,7 +181,7 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
        extern void *bcf_call_add_rg(void *rghash, const char *hdtext, const char *list);
        extern void bcf_call_del_rghash(void *rghash);
        mplp_aux_t **data;
-       int i, tid, pos, *n_plp, beg0 = 0, end0 = 1u<<29, ref_len, ref_tid, max_depth, max_indel_depth;
+       int i, tid, pos, *n_plp, tid0 = -1, beg0 = 0, end0 = 1u<<29, ref_len, ref_tid = -1, max_depth, max_indel_depth;
        const bam_pileup1_t **plp;
        bam_mplp_t iter;
        bam_header_t *h = 0;
@@ -676,7 +214,7 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                data[i]->conf = conf;
                h_tmp = bam_header_read(data[i]->fp);
                data[i]->h = i? h : h_tmp; // for i==0, "h" has not been set yet
-               bam_smpl_add(sm, fn[i], h_tmp->text);
+               bam_smpl_add(sm, fn[i], (conf->flag&MPLP_IGNORE_RG)? 0 : h_tmp->text);
                rghash = bcf_call_add_rg(rghash, h_tmp->text, conf->pl_list);
                if (conf->reg) {
                        int beg, end;
@@ -690,7 +228,7 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                                fprintf(pysamerr, "[%s] malformatted region or wrong seqname for %d-th input.\n", __func__, i+1);
                                exit(1);
                        }
-                       if (i == 0) beg0 = beg, end0 = end;
+                       if (i == 0) tid0 = tid, beg0 = beg, end0 = end;
                        data[i]->iter = bam_iter_query(idx, tid, beg, end);
                        bam_index_destroy(idx);
                }
@@ -738,7 +276,11 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                bca->min_frac = conf->min_frac;
                bca->min_support = conf->min_support;
        }
-       ref_tid = -1; ref = 0;
+       if (tid0 >= 0 && conf->fai) { // region is set
+               ref = faidx_fetch_seq(conf->fai, h->target_name[tid0], 0, 0x7fffffff, &ref_len);
+               ref_tid = tid0;
+               for (i = 0; i < n; ++i) data[i]->ref = ref, data[i]->ref_id = tid0;
+       } else ref_tid = -1, ref = 0;
        iter = bam_mplp_init(n, mplp_func, (void**)data);
        max_depth = conf->max_depth;
        if (max_depth * sm->n > 1<<20)
@@ -754,7 +296,7 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                if (conf->bed && tid >= 0 && !bed_overlap(conf->bed, h->target_name[tid], pos, pos+1)) continue;
                if (tid != ref_tid) {
                        free(ref); ref = 0;
-                       if (conf->fai) ref = fai_fetch(conf->fai, h->target_name[tid], &ref_len);
+                       if (conf->fai) ref = faidx_fetch_seq(conf->fai, h->target_name[tid], 0, 0x7fffffff, &ref_len);
                        for (i = 0; i < n; ++i) data[i]->ref = ref, data[i]->ref_id = tid;
                        ref_tid = tid;
                }
@@ -762,7 +304,7 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                        int total_depth, _ref0, ref16;
                        bcf1_t *b = calloc(1, sizeof(bcf1_t));
                        for (i = total_depth = 0; i < n; ++i) total_depth += n_plp[i];
-                       group_smpl(&gplp, sm, &buf, n, fn, n_plp, plp);
+                       group_smpl(&gplp, sm, &buf, n, fn, n_plp, plp, conf->flag & MPLP_IGNORE_RG);
                        _ref0 = (ref && pos < ref_len)? ref[pos] : 'N';
                        ref16 = bam_nt16_table[_ref0];
                        for (i = 0; i < gplp.n; ++i)
@@ -789,8 +331,10 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                        for (i = 0; i < n; ++i) {
                                int j;
                                printf("\t%d\t", n_plp[i]);
-                               if (n_plp[i] == 0) printf("*\t*");
-                               else {
+                               if (n_plp[i] == 0) {
+                                       printf("*\t*"); // FIXME: printf() is very slow...
+                                       if (conf->flag & MPLP_PRINT_POS) printf("\t*");
+                               } else {
                                        for (j = 0; j < n_plp[i]; ++j)
                                                pileup_seq(plp[i] + j, pos, ref_len, ref);
                                        putchar('\t');
@@ -800,6 +344,21 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                                                if (c > 126) c = 126;
                                                putchar(c);
                                        }
+                                       if (conf->flag & MPLP_PRINT_MAPQ) {
+                                               putchar('\t');
+                                               for (j = 0; j < n_plp[i]; ++j) {
+                                                       int c = plp[i][j].b->core.qual + 33;
+                                                       if (c > 126) c = 126;
+                                                       putchar(c);
+                                               }
+                                       }
+                                       if (conf->flag & MPLP_PRINT_POS) {
+                                               putchar('\t');
+                                               for (j = 0; j < n_plp[i]; ++j) {
+                                                       if (j > 0) putchar(',');
+                                                       printf("%d", plp[i][j].qpos + 1); // FIXME: printf() is very slow...
+                                               }
+                                       }
                                }
                        }
                        putchar('\n');
@@ -880,6 +439,7 @@ int bam_mpileup(int argc, char *argv[])
     int nfiles = 0, use_orphan = 0;
        mplp_conf_t mplp;
        memset(&mplp, 0, sizeof(mplp_conf_t));
+       #define MPLP_PRINT_POS 0x4000
        mplp.max_mq = 60;
        mplp.min_baseQ = 13;
        mplp.capQ_thres = 0;
@@ -887,7 +447,7 @@ int bam_mpileup(int argc, char *argv[])
        mplp.openQ = 40; mplp.extQ = 20; mplp.tandemQ = 100;
        mplp.min_frac = 0.002; mplp.min_support = 1;
        mplp.flag = MPLP_NO_ORPHAN | MPLP_REALN;
-       while ((c = getopt(argc, argv, "Agf:r:l:M:q:Q:uaRC:BDSd:L:b:P:o:e:h:Im:F:EG:6")) >= 0) {
+       while ((c = getopt(argc, argv, "Agf:r:l:M:q:Q:uaRC:BDSd:L:b:P:o:e:h:Im:F:EG:6Os")) >= 0) {
                switch (c) {
                case 'f':
                        mplp.fai = fai_load(optarg);
@@ -901,12 +461,14 @@ int bam_mpileup(int argc, char *argv[])
                case 'u': mplp.flag |= MPLP_NO_COMP | MPLP_GLF; break;
                case 'a': mplp.flag |= MPLP_NO_ORPHAN | MPLP_REALN; break;
                case 'B': mplp.flag &= ~MPLP_REALN; break;
-               case 'R': mplp.flag |= MPLP_REALN; break;
                case 'D': mplp.flag |= MPLP_FMT_DP; break;
                case 'S': mplp.flag |= MPLP_FMT_SP; break;
                case 'I': mplp.flag |= MPLP_NO_INDEL; break;
                case 'E': mplp.flag |= MPLP_EXT_BAQ; break;
                case '6': mplp.flag |= MPLP_ILLUMINA13; break;
+               case 'R': mplp.flag |= MPLP_IGNORE_RG; break;
+               case 's': mplp.flag |= MPLP_PRINT_MAPQ; break;
+               case 'O': mplp.flag |= MPLP_PRINT_POS; break;
                case 'C': mplp.capQ_thres = atoi(optarg); break;
                case 'M': mplp.max_mq = atoi(optarg); break;
                case 'q': mplp.min_mq = atoi(optarg); break;
@@ -941,6 +503,7 @@ int bam_mpileup(int argc, char *argv[])
                fprintf(pysamerr, "       -A           count anomalous read pairs\n");
                fprintf(pysamerr, "       -B           disable BAQ computation\n");
                fprintf(pysamerr, "       -b FILE      list of input BAM files [null]\n");
+               fprintf(pysamerr, "       -C INT       parameter for adjusting mapQ; 0 to disable [0]\n");
                fprintf(pysamerr, "       -d INT       max per-BAM depth to avoid excessive memory usage [%d]\n", mplp.max_depth);
                fprintf(pysamerr, "       -E           extended BAQ for higher sensitivity but lower specificity\n");
                fprintf(pysamerr, "       -f FILE      faidx indexed reference sequence file [null]\n");
@@ -948,11 +511,14 @@ int bam_mpileup(int argc, char *argv[])
                fprintf(pysamerr, "       -l FILE      list of positions (chr pos) or regions (BED) [null]\n");
                fprintf(pysamerr, "       -M INT       cap mapping quality at INT [%d]\n", mplp.max_mq);
                fprintf(pysamerr, "       -r STR       region in which pileup is generated [null]\n");
+               fprintf(pysamerr, "       -R           ignore RG tags\n");
                fprintf(pysamerr, "       -q INT       skip alignments with mapQ smaller than INT [%d]\n", mplp.min_mq);
                fprintf(pysamerr, "       -Q INT       skip bases with baseQ/BAQ smaller than INT [%d]\n", mplp.min_baseQ);
                fprintf(pysamerr, "\nOutput options:\n\n");
                fprintf(pysamerr, "       -D           output per-sample DP in BCF (require -g/-u)\n");
                fprintf(pysamerr, "       -g           generate BCF output (genotype likelihoods)\n");
+               fprintf(pysamerr, "       -O           output base positions on reads (disabled by -g/-u)\n");
+               fprintf(pysamerr, "       -s           output mapping quality (disabled by -g/-u)\n");
                fprintf(pysamerr, "       -S           output per-sample strand bias P-value in BCF (require -g/-u)\n");
                fprintf(pysamerr, "       -u           generate uncompress BCF output\n");
                fprintf(pysamerr, "\nSNP/INDEL genotype likelihoods options (effective with `-g' or `-u'):\n\n");
diff --git a/samtools/bam_reheader.c.pysam.c b/samtools/bam_reheader.c.pysam.c
new file mode 100644 (file)
index 0000000..35154d7
--- /dev/null
@@ -0,0 +1,63 @@
+#include "pysam.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bgzf.h"
+#include "bam.h"
+
+#define BUF_SIZE 0x10000
+
+int bam_reheader(BGZF *in, const bam_header_t *h, int fd)
+{
+       BGZF *fp;
+       bam_header_t *old;
+       int len;
+       uint8_t *buf;
+       if (in->open_mode != 'r') return -1;
+       buf = malloc(BUF_SIZE);
+       old = bam_header_read(in);
+       fp = bgzf_fdopen(fd, "w");
+       bam_header_write(fp, h);
+       if (in->block_offset < in->block_length) {
+               bgzf_write(fp, in->uncompressed_block + in->block_offset, in->block_length - in->block_offset);
+               bgzf_flush(fp);
+       }
+#ifdef _USE_KNETFILE
+       while ((len = knet_read(in->x.fpr, buf, BUF_SIZE)) > 0)
+               fwrite(buf, 1, len, fp->x.fpw);
+#else
+       while (!feof(in->file) && (len = fread(buf, 1, BUF_SIZE, in->file)) > 0)
+               fwrite(buf, 1, len, fp->file);
+#endif
+       free(buf);
+       fp->block_offset = in->block_offset = 0;
+       bgzf_close(fp);
+       return 0;
+}
+
+int main_reheader(int argc, char *argv[])
+{
+       bam_header_t *h;
+       BGZF *in;
+       if (argc != 3) {
+               fprintf(pysamerr, "Usage: samtools reheader <in.header.sam> <in.bam>\n");
+               return 1;
+       }
+       { // read the header
+               tamFile fph = sam_open(argv[1]);
+               if (fph == 0) {
+                       fprintf(pysamerr, "[%s] fail to read the header from %s.\n", __func__, argv[1]);
+                       return 1;
+               }
+               h = sam_header_read(fph);
+               sam_close(fph);
+       }
+       in = strcmp(argv[2], "-")? bam_open(argv[2], "r") : bam_dopen(fileno(stdin), "r");
+       if (in == 0) {
+               fprintf(pysamerr, "[%s] fail to open file %s.\n", __func__, argv[2]);
+               return 1;
+       }
+       bam_reheader(in, h, fileno(stdout));
+       bgzf_close(in);
+       return 0;
+}
index d4abf671f143fe803c9919ecf6dc7c85b1a7e01a..3709702b57d0bae19adf98a24f926be3ae910227 100644 (file)
 #include <ctype.h>
 #include <assert.h>
 #include <string.h>
+#include <math.h>
 #include "bam.h"
 #include "faidx.h"
-#include "bam_maqcns.h"
+#include "bam2bcf.h"
 
 char bam_aux_getCEi(bam1_t *b, int i);
 char bam_aux_getCSi(bam1_t *b, int i);
@@ -52,7 +53,7 @@ typedef struct {
        bamFile fp;
        int curr_tid, left_pos;
        faidx_t *fai;
-       bam_maqcns_t *bmc;
+       bcf_callaux_t *bca;
 
        int ccol, last_pos, row_shift, base_for, color_for, is_dot, l_ref, ins, no_skip, show_name;
        char *ref;
@@ -60,6 +61,7 @@ typedef struct {
 
 int tv_pl_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl, void *data)
 {
+       extern unsigned char bam_nt16_table[256];
        tview_t *tv = (tview_t*)data;
        int i, j, c, rb, attr, max_ins = 0;
        uint32_t call = 0;
@@ -72,11 +74,26 @@ int tv_pl_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl, void
                mvaddch(1, tv->ccol++, c);
        }
        if (pos%10 == 0 && tv->mcol - tv->ccol >= 10) mvprintw(0, tv->ccol, "%-d", pos+1);
-       // print consensus
-       call = bam_maqcns_call(n, pl, tv->bmc);
+       { // call consensus
+               bcf_callret1_t bcr;
+               int qsum[4], a1, a2, tmp;
+               double p[3], prior = 30;
+               bcf_call_glfgen(n, pl, bam_nt16_table[rb], tv->bca, &bcr);
+               for (i = 0; i < 4; ++i) qsum[i] = bcr.qsum[i]<<2 | i;
+               for (i = 1; i < 4; ++i) // insertion sort
+                       for (j = i; j > 0 && qsum[j] > qsum[j-1]; --j)
+                               tmp = qsum[j], qsum[j] = qsum[j-1], qsum[j-1] = tmp;
+               a1 = qsum[0]&3; a2 = qsum[1]&3;
+               p[0] = bcr.p[a1*5+a1]; p[1] = bcr.p[a1*5+a2] + prior; p[2] = bcr.p[a2*5+a2];
+               if ("ACGT"[a1] != toupper(rb)) p[0] += prior + 3;
+               if ("ACGT"[a2] != toupper(rb)) p[2] += prior + 3;
+               if (p[0] < p[1] && p[0] < p[2]) call = (1<<a1)<<16 | (int)((p[1]<p[2]?p[1]:p[2]) - p[0] + .499);
+               else if (p[2] < p[1] && p[2] < p[0]) call = (1<<a2)<<16 | (int)((p[0]<p[1]?p[0]:p[1]) - p[2] + .499);
+               else call = (1<<a1|1<<a2)<<16 | (int)((p[0]<p[2]?p[0]:p[2]) - p[1] + .499);
+       }
        attr = A_UNDERLINE;
-       c = ",ACMGRSVTWYHKDBN"[call>>28&0xf];
-       i = (call>>8&0xff)/10+1;
+       c = ",ACMGRSVTWYHKDBN"[call>>16&0xf];
+       i = (call&0xffff)/10+1;
        if (i > 4) i = 4;
        attr |= COLOR_PAIR(i);
        if (c == toupper(rb)) c = '.';
@@ -193,9 +210,8 @@ tview_t *tv_init(const char *fn, const char *fn_fa)
        if (tv->idx == 0) exit(1);
        tv->lplbuf = bam_lplbuf_init(tv_pl_func, tv);
        if (fn_fa) tv->fai = fai_load(fn_fa);
-       tv->bmc = bam_maqcns_init();
+       tv->bca = bcf_call_init(0.83, 13);
        tv->ins = 1;
-       bam_maqcns_prepare(tv->bmc);
 
        initscr();
        keypad(stdscr, TRUE);
@@ -226,7 +242,7 @@ void tv_destroy(tview_t *tv)
        endwin();
 
        bam_lplbuf_destroy(tv->lplbuf);
-       bam_maqcns_destroy(tv->bmc);
+       bcf_call_destroy(tv->bca);
        bam_index_destroy(tv->idx);
        if (tv->fai) fai_destroy(tv->fai);
        free(tv->ref);
index ba6dbe9b42ae033c6b3c179a730a48312cf927dd..822ae5cf80fd7f9dc375259524935c933f088323 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef BCF_H
 #define BCF_H
 
+#define BCF_VERSION "0.1.17-dev (r973:277)"
+
 #include <stdint.h>
 #include <zlib.h>
 
@@ -150,6 +152,10 @@ extern "C" {
        int bcf_fix_gt(bcf1_t *b);
        // update PL generated by old samtools
        int bcf_fix_pl(bcf1_t *b);
+       // convert PL to GLF-like 10-likelihood GL
+       int bcf_gl10(const bcf1_t *b, uint8_t *gl);
+       // convert up to 4 INDEL alleles to GLF-like 10-likelihood GL
+       int bcf_gl10_indel(const bcf1_t *b, uint8_t *gl);
 
        // string hash table
        void *bcf_build_refhash(bcf_hdr_t *h);
index c48ab03c29cbcbd08c84f3cfd13ae1f8b1d81678..110d0bb0855f59ec2e8eacb7fc0d144bd5ebb1b3 100644 (file)
@@ -7,6 +7,12 @@
 #include "khash.h"
 KHASH_MAP_INIT_STR(str2id, int)
 
+#ifdef _WIN32
+#define srand48(x) srand(x)
+#define drand48() ((double)rand() / RAND_MAX)
+#endif
+
+// FIXME: valgrind report a memory leak in this function. Probably it does not get deallocated...
 void *bcf_build_refhash(bcf_hdr_t *h)
 {
        khash_t(str2id) *hash;
@@ -310,3 +316,77 @@ int bcf_subsam(int n_smpl, int *list, bcf1_t *b)
        b->n_smpl = n_smpl;
        return 0;
 }
+
+static int8_t nt4_table[128] = {
+       4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4 /*'-'*/, 4, 4,
+       4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 0, 4, 1,  4, 4, 4, 2,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 4, 4, 4,  3, 4, 4, 4, -1, 4, 4, 4,  4, 4, 4, 4, 
+       4, 0, 4, 1,  4, 4, 4, 2,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 4, 4, 4,  3, 4, 4, 4, -1, 4, 4, 4,  4, 4, 4, 4
+};
+
+int bcf_gl10(const bcf1_t *b, uint8_t *gl)
+{
+       int a[4], k, l, map[4], k1, j, i;
+       const bcf_ginfo_t *PL;
+       char *s;
+       if (b->ref[1] != 0 || b->n_alleles > 4) return -1; // ref is not a single base or >4 alleles
+       for (i = 0; i < b->n_gi; ++i)
+               if (b->gi[i].fmt == bcf_str2int("PL", 2)) break;
+       if (i == b->n_gi) return -1; // no PL
+       PL = b->gi + i;
+       a[0] = nt4_table[(int)b->ref[0]];
+       if (a[0] > 3 || a[0] < 0) return -1; // ref is not A/C/G/T
+       a[1] = a[2] = a[3] = -2; // -1 has a special meaning
+       if (b->alt[0] == 0) return -1; // no alternate allele
+       map[0] = map[1] = map[2] = map[3] = -2;
+       map[a[0]] = 0;
+       for (k = 0, s = b->alt, k1 = -1; k < 3 && *s; ++k, s += 2) {
+               if (s[1] != ',' && s[1] != 0) return -1; // ALT is not single base
+               a[k+1] = nt4_table[(int)*s];
+               if (a[k+1] >= 0) map[a[k+1]] = k+1;
+               else k1 = k + 1;
+               if (s[1] == 0) break; // the end of the ALT string
+       }
+       for (k = 0; k < 4; ++k)
+               if (map[k] < 0) map[k] = k1;
+       for (i = 0; i < b->n_smpl; ++i) {
+               const uint8_t *p = PL->data + i * PL->len; // the PL for the i-th individual
+               uint8_t *g = gl + 10 * i;
+               for (k = j = 0; k < 4; ++k) {
+                       for (l = k; l < 4; ++l) {
+                               int t, x = map[k], y = map[l];
+                               if (x > y) t = x, x = y, y = t; // make sure x is the smaller
+                               g[j++] = p[y * (y+1) / 2 + x];
+                       }
+               }
+       }
+       return 0;
+}
+
+int bcf_gl10_indel(const bcf1_t *b, uint8_t *gl)
+{
+       int k, l, j, i;
+       const bcf_ginfo_t *PL;
+       if (b->alt[0] == 0) return -1; // no alternate allele
+       for (i = 0; i < b->n_gi; ++i)
+               if (b->gi[i].fmt == bcf_str2int("PL", 2)) break;
+       if (i == b->n_gi) return -1; // no PL
+       PL = b->gi + i;
+       for (i = 0; i < b->n_smpl; ++i) {
+               const uint8_t *p = PL->data + i * PL->len; // the PL for the i-th individual
+               uint8_t *g = gl + 10 * i;
+               for (k = j = 0; k < 4; ++k) {
+                       for (l = k; l < 4; ++l) {
+                               int t, x = k, y = l;
+                               if (x > y) t = x, x = y, y = t; // make sure x is the smaller
+                               x = y * (y+1) / 2 + x;
+                               g[j++] = x < PL->len? p[x] : 255;
+                       }
+               }
+       }
+       return 0;
+}
index 378c3d5bb4be6f697b9c0d90cb777353a51b4d5c..fcd2456975e6dc804de79057b268c75fdc645bfd 100644 (file)
 #include "kstring.h"
 #include "time.h"
 
+#ifdef _WIN32
+#define srand48(x) srand(x)
+#define lrand48() rand()
+#endif
+
 #include "kseq.h"
 KSTREAM_INIT(gzFile, gzread, 16384)
 
@@ -28,9 +33,12 @@ KSTREAM_INIT(gzFile, gzread, 16384)
 #define VC_ANNO_MAX 16384
 #define VC_FIX_PL   32768
 #define VC_EM       0x10000
+#define VC_PAIRCALL 0x20000
+#define VC_QCNT     0x40000
 
 typedef struct {
        int flag, prior_type, n1, n_sub, *sublist, n_perm;
+       uint32_t *trio_aux;
        char *prior_file, **subsam, *fn_dict;
        uint8_t *ploidy;
        double theta, pref, indel_frac, min_perm_p, min_smpl_frac, min_lrt;
@@ -104,7 +112,7 @@ static void rm_info(bcf1_t *b, const char *key)
        bcf_sync(b);
 }
 
-static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr, double pref, int flag, double em[9])
+static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr, double pref, int flag, double em[10], int cons_llr, int64_t cons_gt)
 {
        kstring_t s;
        int has_I16, is_var;
@@ -124,6 +132,13 @@ static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr,
                if (em[4] >= 0 && em[4] <= 0.05) ksprintf(&s, ";G3=%.4g,%.4g,%.4g;HWE=%.3g", em[3], em[2], em[1], em[4]);
                if (em[5] >= 0 && em[6] >= 0) ksprintf(&s, ";AF2=%.4g,%.4g", 1 - em[5], 1 - em[6]);
                if (em[7] >= 0) ksprintf(&s, ";LRT=%.3g", em[7]);
+               if (em[8] >= 0) ksprintf(&s, ";LRT2=%.3g", em[8]);
+       }
+       if (cons_llr > 0) {
+               ksprintf(&s, ";CLR=%d", cons_llr);
+               if (cons_gt > 0)
+                       ksprintf(&s, ";UGT=%c%c%c;CGT=%c%c%c", cons_gt&0xff, cons_gt>>8&0xff, cons_gt>>16&0xff,
+                                    cons_gt>>32&0xff, cons_gt>>40&0xff, cons_gt>>48&0xff);
        }
        if (pr == 0) { // if pr is unset, return
                kputc('\0', &s); kputs(b->fmt, &s); kputc('\0', &s);
@@ -136,7 +151,8 @@ static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr,
        is_var = (pr->p_ref < pref);
        r = is_var? pr->p_ref : pr->p_var;
 
-       ksprintf(&s, ";CI95=%.4g,%.4g", pr->cil, pr->cih); // FIXME: when EM is not used, ";" should be omitted!
+//     ksprintf(&s, ";CI95=%.4g,%.4g", pr->cil, pr->cih); // FIXME: when EM is not used, ";" should be omitted!
+       ksprintf(&s, ";AC1=%d", pr->ac);
        if (has_I16) ksprintf(&s, ";DP4=%d,%d,%d,%d;MQ=%d", a.d[0], a.d[1], a.d[2], a.d[3], a.mq);
        fq = pr->p_ref_folded < 0.5? -4.343 * log(pr->p_ref_folded) : 4.343 * log(pr->p_var_folded);
        if (fq < -999) fq = -999;
@@ -150,6 +166,7 @@ static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr,
                        if (q[i] > 255) q[i] = 255;
                }
                if (pr->perm_rank >= 0) ksprintf(&s, ";PR=%d", pr->perm_rank);
+               // ksprintf(&s, ";LRT3=%.3g", pr->lrt);
                ksprintf(&s, ";PCHI2=%.3g;PC2=%d,%d", q[1], q[2], pr->p_chi2);
        }
        if (has_I16 && a.is_tested) ksprintf(&s, ";PV4=%.2g,%.2g,%.2g,%.2g", a.p[0], a.p[1], a.p[2], a.p[3]);
@@ -231,13 +248,21 @@ static void write_header(bcf_hdr_t *h)
        if (!strstr(str.s, "##INFO=<ID=FQ,"))
                kputs("##INFO=<ID=FQ,Number=1,Type=Float,Description=\"Phred probability of all samples being the same\">\n", &str);
        if (!strstr(str.s, "##INFO=<ID=AF1,"))
-               kputs("##INFO=<ID=AF1,Number=1,Type=Float,Description=\"Max-likelihood estimate of the site allele frequency of the first ALT allele\">\n", &str);
+               kputs("##INFO=<ID=AF1,Number=1,Type=Float,Description=\"Max-likelihood estimate of the first ALT allele frequency (assuming HWE)\">\n", &str);
+       if (!strstr(str.s, "##INFO=<ID=AC1,"))
+               kputs("##INFO=<ID=AC1,Number=1,Type=Float,Description=\"Max-likelihood estimate of the first ALT allele count (no HWE assumption)\">\n", &str);
        if (!strstr(str.s, "##INFO=<ID=G3,"))
                kputs("##INFO=<ID=G3,Number=3,Type=Float,Description=\"ML estimate of genotype frequencies\">\n", &str);
        if (!strstr(str.s, "##INFO=<ID=HWE,"))
                kputs("##INFO=<ID=HWE,Number=1,Type=Float,Description=\"Chi^2 based HWE test P-value based on G3\">\n", &str);
-       if (!strstr(str.s, "##INFO=<ID=CI95,"))
-               kputs("##INFO=<ID=CI95,Number=2,Type=Float,Description=\"Equal-tail Bayesian credible interval of the site allele frequency at the 95% level\">\n", &str);
+       if (!strstr(str.s, "##INFO=<ID=CLR,"))
+               kputs("##INFO=<ID=CLR,Number=1,Type=Integer,Description=\"Log ratio of genotype likelihoods with and without the constraint\">\n", &str);
+       if (!strstr(str.s, "##INFO=<ID=UGT,"))
+               kputs("##INFO=<ID=UGT,Number=1,Type=String,Description=\"The most probable unconstrained genotype configuration in the trio\">\n", &str);
+       if (!strstr(str.s, "##INFO=<ID=CGT,"))
+               kputs("##INFO=<ID=CGT,Number=1,Type=String,Description=\"The most probable constrained genotype configuration in the trio\">\n", &str);
+//     if (!strstr(str.s, "##INFO=<ID=CI95,"))
+//             kputs("##INFO=<ID=CI95,Number=2,Type=Float,Description=\"Equal-tail Bayesian credible interval of the site allele frequency at the 95% level\">\n", &str);
        if (!strstr(str.s, "##INFO=<ID=PV4,"))
                kputs("##INFO=<ID=PV4,Number=4,Type=Float,Description=\"P-values for strand bias, baseQ bias, mapQ bias and tail distance bias\">\n", &str);
     if (!strstr(str.s, "##INFO=<ID=INDEL,"))
@@ -250,6 +275,8 @@ static void write_header(bcf_hdr_t *h)
         kputs("##INFO=<ID=QCHI2,Number=1,Type=Integer,Description=\"Phred scaled PCHI2.\">\n", &str);
     if (!strstr(str.s, "##INFO=<ID=RP,"))
         kputs("##INFO=<ID=PR,Number=1,Type=Integer,Description=\"# permutations yielding a smaller PCHI2.\">\n", &str);
+    if (!strstr(str.s, "##INFO=<ID=VDB,"))
+        kputs("##INFO=<ID=VDB,Number=1,Type=Float,Description=\"Variant Distance Bias\">\n", &str);
     if (!strstr(str.s, "##FORMAT=<ID=GT,"))
         kputs("##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">\n", &str);
     if (!strstr(str.s, "##FORMAT=<ID=GQ,"))
@@ -261,7 +288,7 @@ static void write_header(bcf_hdr_t *h)
        if (!strstr(str.s, "##FORMAT=<ID=SP,"))
                kputs("##FORMAT=<ID=SP,Number=1,Type=Integer,Description=\"Phred-scaled strand bias P-value\">\n", &str);
        if (!strstr(str.s, "##FORMAT=<ID=PL,"))
-               kputs("##FORMAT=<ID=PL,Number=-1,Type=Integer,Description=\"List of Phred-scaled genotype likelihoods, number of values is (#ALT+1)*(#ALT+2)/2\">\n", &str);
+               kputs("##FORMAT=<ID=PL,Number=G,Type=Integer,Description=\"List of Phred-scaled genotype likelihoods\">\n", &str);
        h->l_txt = str.l + 1; h->txt = str.s;
 }
 
@@ -274,10 +301,15 @@ int bcfview(int argc, char *argv[])
        extern int bcf_fix_gt(bcf1_t *b);
        extern int bcf_anno_max(bcf1_t *b);
        extern int bcf_shuffle(bcf1_t *b, int seed);
+       extern uint32_t *bcf_trio_prep(int is_x, int is_son);
+       extern int bcf_trio_call(uint32_t *prep, const bcf1_t *b, int *llr, int64_t *gt);
+       extern int bcf_pair_call(const bcf1_t *b);
+       extern int bcf_min_diff(const bcf1_t *b);
+
        bcf_t *bp, *bout = 0;
        bcf1_t *b, *blast;
        int c, *seeds = 0;
-       uint64_t n_processed = 0;
+       uint64_t n_processed = 0, qcnt[256];
        viewconf_t vc;
        bcf_p1aux_t *p1 = 0;
        bcf_hdr_t *hin, *hout;
@@ -287,7 +319,8 @@ int bcfview(int argc, char *argv[])
        tid = begin = end = -1;
        memset(&vc, 0, sizeof(viewconf_t));
        vc.prior_type = vc.n1 = -1; vc.theta = 1e-3; vc.pref = 0.5; vc.indel_frac = -1.; vc.n_perm = 0; vc.min_perm_p = 0.01; vc.min_smpl_frac = 0; vc.min_lrt = 1;
-       while ((c = getopt(argc, argv, "FN1:l:cC:eHAGvbSuP:t:p:QgLi:IMs:D:U:X:d:")) >= 0) {
+       memset(qcnt, 0, 8 * 256);
+       while ((c = getopt(argc, argv, "FN1:l:cC:eHAGvbSuP:t:p:QgLi:IMs:D:U:X:d:T:Y")) >= 0) {
                switch (c) {
                case '1': vc.n1 = atoi(optarg); break;
                case 'l': vc.bed = bed_read(optarg); break;
@@ -305,6 +338,7 @@ int bcfview(int argc, char *argv[])
                case 'g': vc.flag |= VC_CALL_GT | VC_CALL; break;
                case 'I': vc.flag |= VC_NO_INDEL; break;
                case 'M': vc.flag |= VC_ANNO_MAX; break;
+               case 'Y': vc.flag |= VC_QCNT; break;
                case 't': vc.theta = atof(optarg); break;
                case 'p': vc.pref = atof(optarg); break;
                case 'i': vc.indel_frac = atof(optarg); break;
@@ -319,6 +353,16 @@ int bcfview(int argc, char *argv[])
                        for (tid = 0; tid < vc.n_sub; ++tid) vc.ploidy[tid] = vc.subsam[tid][strlen(vc.subsam[tid]) + 1];
                        tid = -1;
                        break;
+               case 'T':
+                       if (strcmp(optarg, "trioauto") == 0) vc.trio_aux = bcf_trio_prep(0, 0);
+                       else if (strcmp(optarg, "trioxd") == 0) vc.trio_aux = bcf_trio_prep(1, 0);
+                       else if (strcmp(optarg, "trioxs") == 0) vc.trio_aux = bcf_trio_prep(1, 1);
+                       else if (strcmp(optarg, "pair") == 0) vc.flag |= VC_PAIRCALL;
+                       else {
+                               fprintf(pysamerr, "[%s] Option '-T' can only take value trioauto, trioxd or trioxs.\n", __func__);
+                               return 1;
+                       }
+                       break;
                case 'P':
                        if (strcmp(optarg, "full") == 0) vc.prior_type = MC_PTYPE_FULL;
                        else if (strcmp(optarg, "cond2") == 0) vc.prior_type = MC_PTYPE_COND2;
@@ -353,6 +397,7 @@ int bcfview(int argc, char *argv[])
                fprintf(pysamerr, "       -p FLOAT  variant if P(ref|D)<FLOAT [%.3g]\n", vc.pref);
                fprintf(pysamerr, "       -P STR    type of prior: full, cond2, flat [full]\n");
                fprintf(pysamerr, "       -t FLOAT  scaled substitution mutation rate [%.4g]\n", vc.theta);
+               fprintf(pysamerr, "       -T STR    constrained calling; STR can be: pair, trioauto, trioxd and trioxs (see manual) [null]\n");
                fprintf(pysamerr, "       -v        output potential variant sites only (force -c)\n");
                fprintf(pysamerr, "\nContrast calling and association test options:\n\n");
                fprintf(pysamerr, "       -1 INT    number of group-1 samples [0]\n");
@@ -426,8 +471,9 @@ int bcfview(int argc, char *argv[])
                }
        }
        while (vcf_read(bp, hin, b) > 0) {
-               int is_indel;
-               double em[9];
+               int is_indel, cons_llr = -1;
+               int64_t cons_gt = -1;
+               double em[10];
                if ((vc.flag & VC_VARONLY) && strcmp(b->alt, "X") == 0) continue;
                if ((vc.flag & VC_VARONLY) && vc.min_smpl_frac > 0.) {
                        extern int bcf_smpl_covered(const bcf1_t *b);
@@ -452,16 +498,25 @@ int bcfview(int argc, char *argv[])
                        if (!(l > begin && end > b->pos)) continue;
                }
                ++n_processed;
+               if ((vc.flag & VC_QCNT) && !is_indel) { // summarize the difference
+                       int x = bcf_min_diff(b);
+                       if (x > 255) x = 255;
+                       if (x >= 0) ++qcnt[x];
+               }
                if (vc.flag & VC_QCALL) { // output QCALL format; STOP here
                        bcf_2qcall(hout, b);
                        continue;
                }
-               if (vc.flag & VC_EM) bcf_em1(b, vc.n1, 0xff, em);
+               if (vc.trio_aux) // do trio calling
+                       bcf_trio_call(vc.trio_aux, b, &cons_llr, &cons_gt);
+               else if (vc.flag & VC_PAIRCALL)
+                       cons_llr = bcf_pair_call(b);
+               if (vc.flag & (VC_CALL|VC_ADJLD|VC_EM)) bcf_gl2pl(b);
+               if (vc.flag & VC_EM) bcf_em1(b, vc.n1, 0x1ff, em);
                else {
                        int i;
                        for (i = 0; i < 9; ++i) em[i] = -1.;
                }
-               if (vc.flag & (VC_CALL|VC_ADJLD)) bcf_gl2pl(b);
                if (vc.flag & VC_CALL) { // call variants
                        bcf_p1rst_t pr;
                        int calret = bcf_p1_cal(b, (em[7] >= 0 && em[7] < vc.min_lrt), p1, &pr);
@@ -475,7 +530,7 @@ int bcfview(int argc, char *argv[])
                                int i, n = 0;
                                for (i = 0; i < vc.n_perm; ++i) {
 #ifdef BCF_PERM_LRT // LRT based permutation is much faster but less robust to artifacts
-                                       double x[9];
+                                       double x[10];
                                        bcf_shuffle(b, seeds[i]);
                                        bcf_em1(b, vc.n1, 1<<7, x);
                                        if (x[7] < em[7]) ++n;
@@ -487,8 +542,8 @@ int bcfview(int argc, char *argv[])
                                }
                                pr.perm_rank = n;
                        }
-                       if (calret >= 0) update_bcf1(b, p1, &pr, vc.pref, vc.flag, em);
-               } else if (vc.flag & VC_EM) update_bcf1(b, 0, 0, 0, vc.flag, em);
+                       if (calret >= 0) update_bcf1(b, p1, &pr, vc.pref, vc.flag, em, cons_llr, cons_gt);
+               } else if (vc.flag & VC_EM) update_bcf1(b, 0, 0, 0, vc.flag, em, cons_llr, cons_gt);
                if (vc.flag & VC_ADJLD) { // compute LD
                        double f[4], r2;
                        if ((r2 = bcf_pair_freq(blast, b, f)) >= 0) {
@@ -517,12 +572,16 @@ int bcfview(int argc, char *argv[])
        vcf_close(bp); vcf_close(bout);
        if (vc.fn_dict) free(vc.fn_dict);
        if (vc.ploidy) free(vc.ploidy);
+       if (vc.trio_aux) free(vc.trio_aux);
        if (vc.n_sub) {
                int i;
                for (i = 0; i < vc.n_sub; ++i) free(vc.subsam[i]);
                free(vc.subsam); free(vc.sublist);
        }
        if (vc.bed) bed_destroy(vc.bed);
+       if (vc.flag & VC_QCNT)
+               for (c = 0; c < 256; ++c)
+                       fprintf(pysamerr, "QT\t%d\t%lld\n", c, (long long)qcnt[c]);
        if (seeds) free(seeds);
        if (p1) bcf_p1_destroy(p1);
        return 0;
index 914dc0587b8bc83486ea7b7232347a1bf87b4905..94b6d7532ca012c698986b7f668e198331b211a5 100644 (file)
@@ -170,7 +170,7 @@ static double lk_ratio_test(int n, int n1, const double *pdg, double f3[3][3])
 // x[5..6]: group1 freq, group2 freq
 // x[7]: 1-degree P-value
 // x[8]: 2-degree P-value
-int bcf_em1(const bcf1_t *b, int n1, int flag, double x[9])
+int bcf_em1(const bcf1_t *b, int n1, int flag, double x[10])
 {
        double *pdg;
        int i, n, n2;
@@ -182,7 +182,7 @@ int bcf_em1(const bcf1_t *b, int n1, int flag, double x[9])
        n = b->n_smpl; n2 = n - n1;
        pdg = get_pdg3(b);
        if (pdg == 0) return -1;
-       for (i = 0; i < 9; ++i) x[i] = -1.;
+       for (i = 0; i < 10; ++i) x[i] = -1.; // set to negative
        {
                if ((x[0] = est_freq(n, pdg)) < 0.) {
                        free(pdg);
@@ -190,7 +190,7 @@ int bcf_em1(const bcf1_t *b, int n1, int flag, double x[9])
                }
                x[0] = freqml(x[0], 0, n, pdg);
        }
-       if (flag & (0xf<<1|1<<8)) { // estimate the genotype frequency and test HWE
+       if (flag & (0xf<<1|3<<8)) { // estimate the genotype frequency and test HWE
                double *g = x + 1, f3[3], r;
                f3[0] = g[0] = (1 - x[0]) * (1 - x[0]);
                f3[1] = g[1] = 2 * x[0] * (1 - x[0]);
@@ -209,20 +209,24 @@ int bcf_em1(const bcf1_t *b, int n1, int flag, double x[9])
                x[6] = freqml(x[0], n1, n, pdg);
        }
        if ((flag & 1<<7) && n1 > 0 && n1 < n) { // 1-degree P-value
-               double f[3], f3[3][3];
+               double f[3], f3[3][3], tmp;
                f[0] = x[0]; f[1] = x[5]; f[2] = x[6];
                for (i = 0; i < 3; ++i)
                        f3[i][0] = (1-f[i])*(1-f[i]), f3[i][1] = 2*f[i]*(1-f[i]), f3[i][2] = f[i]*f[i];
-               x[7] = kf_gammaq(.5, log(lk_ratio_test(n, n1, pdg, f3)));
+               tmp = log(lk_ratio_test(n, n1, pdg, f3));
+               if (tmp < 0) tmp = 0;
+               x[7] = kf_gammaq(.5, tmp);
        }
-       if ((flag & 1<<8) && n1 > 0 && n1 < n) { // 2-degree P-value
-               double g[3][3];
+       if ((flag & 3<<8) && n1 > 0 && n1 < n) { // 2-degree P-value
+               double g[3][3], tmp;
                for (i = 0; i < 3; ++i) memcpy(g[i], x + 1, 3 * sizeof(double));
                for (i = 0; i < ITER_MAX; ++i)
                        if (g3_iter(g[1], pdg, 0, n1) < EPS) break;
                for (i = 0; i < ITER_MAX; ++i)
                        if (g3_iter(g[2], pdg, n1, n) < EPS) break;
-               x[8] = kf_gammaq(1., log(lk_ratio_test(n, n1, pdg, g)));
+               tmp = log(lk_ratio_test(n, n1, pdg, g));
+               if (tmp < 0) tmp = 0;
+               x[8] = kf_gammaq(1., tmp);
        }
        // free
        free(pdg);
diff --git a/samtools/bcftools/mut.c.pysam.c b/samtools/bcftools/mut.c.pysam.c
new file mode 100644 (file)
index 0000000..59ffb60
--- /dev/null
@@ -0,0 +1,129 @@
+#include "pysam.h"
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "bcf.h"
+
+#define MAX_GENO 359
+
+int8_t seq_bitcnt[] = { 4, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };
+char *seq_nt16rev = "XACMGRSVTWYHKDBN";
+
+uint32_t *bcf_trio_prep(int is_x, int is_son)
+{
+       int i, j, k, n, map[10];
+       uint32_t *ret;
+       ret = calloc(MAX_GENO, 4);
+       for (i = 0, k = 0; i < 4; ++i)
+               for (j = i; j < 4; ++j)
+                       map[k++] = 1<<i|1<<j;
+       for (i = 0, n = 1; i < 10; ++i) { // father
+               if (is_x && seq_bitcnt[map[i]] != 1) continue;
+               if (is_x && is_son) {
+                       for (j = 0; j < 10; ++j) // mother
+                               for (k = 0; k < 10; ++k) // child
+                                       if (seq_bitcnt[map[k]] == 1 && (map[j]&map[k]))
+                                               ret[n++] = j<<16 | i<<8 | k;
+               } else {
+                       for (j = 0; j < 10; ++j) // mother
+                               for (k = 0; k < 10; ++k) // child
+                                       if ((map[i]&map[k]) && (map[j]&map[k]) && ((map[i]|map[j])&map[k]) == map[k])
+                                               ret[n++] = j<<16 | i<<8 | k;
+               }
+       }
+       ret[0] = n - 1;
+       return ret;
+}
+
+
+int bcf_trio_call(const uint32_t *prep, const bcf1_t *b, int *llr, int64_t *gt)
+{
+       int i, j, k;
+       const bcf_ginfo_t *PL;
+       uint8_t *gl10;
+       int map[10];
+       if (b->n_smpl != 3) return -1; // not a trio
+       for (i = 0; i < b->n_gi; ++i)
+               if (b->gi[i].fmt == bcf_str2int("PL", 2)) break;
+       if (i == b->n_gi) return -1; // no PL
+       gl10 = alloca(10 * b->n_smpl);
+       if (bcf_gl10(b, gl10) < 0) {
+               if (bcf_gl10_indel(b, gl10) < 0) return -1;
+       }
+       PL = b->gi + i;
+       for (i = 0, k = 0; i < 4; ++i)
+               for (j = i; j < 4; ++j)
+                       map[k++] = seq_nt16rev[1<<i|1<<j];
+       for (j = 0; j < 3; ++j) // check if ref hom is the most probable in all members
+               if (((uint8_t*)PL->data)[j * PL->len] != 0) break;
+       if (j < 3) { // we need to go through the complex procedure
+               uint8_t *g[3];
+               int minc = 1<<30, minc_j = -1, minf = 0, gtf = 0, gtc = 0;
+               g[0] = gl10;
+               g[1] = gl10 + 10;
+               g[2] = gl10 + 20;
+               for (j = 1; j <= (int)prep[0]; ++j) { // compute LK with constraint
+                       int sum = g[0][prep[j]&0xff] + g[1][prep[j]>>8&0xff] + g[2][prep[j]>>16&0xff];
+                       if (sum < minc) minc = sum, minc_j = j;
+               }
+               gtc |= map[prep[minc_j]&0xff]; gtc |= map[prep[minc_j]>>8&0xff]<<8; gtc |= map[prep[minc_j]>>16]<<16;
+               for (j = 0; j < 3; ++j) { // compute LK without constraint
+                       int min = 1<<30, min_k = -1;
+                       for (k = 0; k < 10; ++k)
+                               if (g[j][k] < min) min = g[j][k], min_k = k;
+                       gtf |= map[min_k]<<(j*8);
+                       minf += min;
+               }
+               *llr = minc - minf; *gt = (int64_t)gtc<<32 | gtf;
+       } else *llr = 0, *gt = -1;
+       return 0;
+}
+
+int bcf_pair_call(const bcf1_t *b)
+{
+       int i, j, k;
+       const bcf_ginfo_t *PL;
+       if (b->n_smpl != 2) return -1; // not a pair
+       for (i = 0; i < b->n_gi; ++i)
+               if (b->gi[i].fmt == bcf_str2int("PL", 2)) break;
+       if (i == b->n_gi) return -1; // no PL
+       PL = b->gi + i;
+       for (j = 0; j < 2; ++j) // check if ref hom is the most probable in all members
+               if (((uint8_t*)PL->data)[j * PL->len] != 0) break;
+       if (j < 2) { // we need to go through the complex procedure
+               uint8_t *g[2];
+               int minc = 1<<30, minf = 0;
+               g[0] = PL->data;
+               g[1] = (uint8_t*)PL->data + PL->len;
+               for (j = 0; j < PL->len; ++j) // compute LK with constraint
+                       minc = minc < g[0][j] + g[1][j]? minc : g[0][j] + g[1][j];
+               for (j = 0; j < 2; ++j) { // compute LK without constraint
+                       int min = 1<<30;
+                       for (k = 0; k < PL->len; ++k)
+                               min = min < g[j][k]? min : g[j][k];
+                       minf += min;
+               }
+               return minc - minf;
+       } else return 0;
+}
+
+int bcf_min_diff(const bcf1_t *b)
+{
+       int i, min = 1<<30;
+       const bcf_ginfo_t *PL;
+       for (i = 0; i < b->n_gi; ++i)
+               if (b->gi[i].fmt == bcf_str2int("PL", 2)) break;
+       if (i == b->n_gi) return -1; // no PL
+       PL = b->gi + i;
+       for (i = 0; i < b->n_smpl; ++i) {
+               int m1, m2, j;
+               const uint8_t *p = (uint8_t*)PL->data;
+               m1 = m2 = 1<<30;
+               for (j = 0; j < PL->len; ++j) {
+                       if ((int)p[j] < m1) m2 = m1, m1 = p[j];
+                       else if ((int)p[j] < m2) m2 = p[j];
+               }
+               min = min < m2 - m1? min : m2 - m1;
+       }
+       return min;
+}
index ac331848f624e466091552f6291ea46e0d239062..5bc52a564e85bb44a09cc4dedb65783b1762bc6b 100644 (file)
@@ -499,6 +499,13 @@ int bcf_p1_cal(const bcf1_t *b, int do_contrast, bcf_p1aux_t *ma, bcf_p1rst_t *r
        for (k = 0, sum = 0.; k < ma->M; ++k)
                sum += ma->afs1[k];
        rst->p_var = (double)sum;
+       { // compute the allele count
+               double max = -1;
+               rst->ac = -1;
+               for (k = 0; k <= ma->M; ++k)
+                       if (max < ma->z[k]) max = ma->z[k], rst->ac = k;
+               rst->ac = ma->M - rst->ac;
+       }
        // calculate f_flat and f_em
        for (k = 0, sum = 0.; k <= ma->M; ++k)
                sum += (long double)ma->z[k];
@@ -511,16 +518,27 @@ int bcf_p1_cal(const bcf1_t *b, int do_contrast, bcf_p1aux_t *ma, bcf_p1rst_t *r
        { // estimate equal-tail credible interval (95% level)
                int l, h;
                double p;
-               for (i = 0, p = 0.; i < ma->M; ++i)
+               for (i = 0, p = 0.; i <= ma->M; ++i)
                        if (p + ma->afs1[i] > 0.025) break;
                        else p += ma->afs1[i];
                l = i;
-               for (i = ma->M-1, p = 0.; i >= 0; --i)
+               for (i = ma->M, p = 0.; i >= 0; --i)
                        if (p + ma->afs1[i] > 0.025) break;
                        else p += ma->afs1[i];
                h = i;
                rst->cil = (double)(ma->M - h) / ma->M; rst->cih = (double)(ma->M - l) / ma->M;
        }
+       if (ma->n1 > 0) { // compute LRT
+               double max0, max1, max2;
+               for (k = 0, max0 = -1; k <= ma->M; ++k)
+                       if (max0 < ma->z[k]) max0 = ma->z[k];
+               for (k = 0, max1 = -1; k <= ma->n1 * 2; ++k)
+                       if (max1 < ma->z1[k]) max1 = ma->z1[k];
+               for (k = 0, max2 = -1; k <= ma->M - ma->n1 * 2; ++k)
+                       if (max2 < ma->z2[k]) max2 = ma->z2[k];
+               rst->lrt = log(max1 * max2 / max0);
+               rst->lrt = rst->lrt < 0? 1 : kf_gammaq(.5, rst->lrt);
+       } else rst->lrt = -1.0;
        rst->cmp[0] = rst->cmp[1] = rst->cmp[2] = rst->p_chi2 = -1.0;
        if (do_contrast && rst->p_var > 0.5) // skip contrast2() if the locus is a strong non-variant
                rst->p_chi2 = contrast2(ma, rst->cmp);
index 571f42f1c63f5e93a4d1b601bd4843f7e1a48483..0a51a0ae2650f377f4fc48665109487687eb69cb 100644 (file)
@@ -8,9 +8,10 @@ typedef struct __bcf_p1aux_t bcf_p1aux_t;
 
 typedef struct {
        int rank0, perm_rank; // NB: perm_rank is always set to -1 by bcf_p1_cal()
+       int ac; // ML alternative allele count
        double f_exp, f_flat, p_ref_folded, p_ref, p_var_folded, p_var;
        double cil, cih;
-       double cmp[3], p_chi2; // used by contrast2()
+       double cmp[3], p_chi2, lrt; // used by contrast2()
 } bcf_p1rst_t;
 
 #define MC_PTYPE_FULL  1
@@ -32,7 +33,7 @@ extern "C" {
        int bcf_p1_set_n1(bcf_p1aux_t *b, int n1);
        void bcf_p1_set_folded(bcf_p1aux_t *p1a); // only effective when set_n1() is not called
 
-       int bcf_em1(const bcf1_t *b, int n1, int flag, double x[9]);
+       int bcf_em1(const bcf1_t *b, int n1, int flag, double x[10]);
 
 #ifdef __cplusplus
 }
index c3ab06ff5a82be4e4c377bdb9c343f30754418c4..2bbb05f5347849eaf7f2689fb78152cae732c241 100644 (file)
@@ -6,6 +6,10 @@
 #include <stdio.h>
 #include <zlib.h>
 
+#ifdef _WIN32
+#define drand48() ((double)rand() / RAND_MAX)
+#endif
+
 #include "ksort.h"
 KSORT_INIT_GENERIC(uint64_t)
 
@@ -121,8 +125,10 @@ void *bed_read(const char *fn)
                        if (ks_getuntil(ks, 0, str, &dret) > 0 && isdigit(str->s[0])) {
                                beg = atoi(str->s); // begin
                                if (dret != '\n') {
-                                       if (ks_getuntil(ks, 0, str, &dret) > 0 && isdigit(str->s[0]))
+                                       if (ks_getuntil(ks, 0, str, &dret) > 0 && isdigit(str->s[0])) {
                                                end = atoi(str->s); // end
+                                               if (end < beg) end = -1;
+                                       }
                                }
                        }
                }
index 526a9c0022ff477807e6475b2910c2497f4caf36..376629ead6701fc4bebdec4337c10abbed1da06b 100644 (file)
@@ -9,7 +9,8 @@
 #include "khash.h"
 
 typedef struct {
-       uint64_t len:32, line_len:16, line_blen:16;
+       int32_t line_len, line_blen;
+       int64_t len;
        uint64_t offset;
 } faidx1_t;
 KHASH_MAP_INIT_STR(s, faidx1_t)
@@ -66,10 +67,11 @@ faidx_t *fai_build_core(RAZF *rz)
 {
        char c, *name;
        int l_name, m_name, ret;
-       int len, line_len, line_blen, state;
+       int line_len, line_blen, state;
        int l1, l2;
        faidx_t *idx;
        uint64_t offset;
+       int64_t len;
 
        idx = (faidx_t*)calloc(1, sizeof(faidx_t));
        idx->hash = kh_init(s);
@@ -121,11 +123,6 @@ faidx_t *fai_build_core(RAZF *rz)
                                return 0;
                        }
                        ++l1; len += l2;
-                       if (l2 >= 0x10000) {
-                               fprintf(pysamerr, "[fai_build_core] line length exceeds 65535 in sequence '%s'.\n", name);
-                               free(name); fai_destroy(idx);
-                               return 0;
-                       }
                        if (state == 1) line_len = l1, line_blen = l2, state = 0;
                        else if (state == 0) {
                                if (l1 != line_len || l2 != line_blen) state = 2;
@@ -307,8 +304,8 @@ faidx_t *fai_load(const char *fn)
 
 char *fai_fetch(const faidx_t *fai, const char *str, int *len)
 {
-       char *s, *p, c;
-       int i, l, k;
+       char *s, c;
+       int i, l, k, name_end;
        khiter_t iter;
        faidx1_t val;
        khash_t(s) *h;
@@ -316,31 +313,43 @@ char *fai_fetch(const faidx_t *fai, const char *str, int *len)
 
        beg = end = -1;
        h = fai->hash;
-       l = strlen(str);
-       p = s = (char*)malloc(l+1);
-       /* squeeze out "," */
-       for (i = k = 0; i != l; ++i)
-               if (str[i] != ',' && !isspace(str[i])) s[k++] = str[i];
-       s[k] = 0;
-       for (i = 0; i != k; ++i) if (s[i] == ':') break;
-       s[i] = 0;
-       iter = kh_get(s, h, s); /* get the ref_id */
-       if (iter == kh_end(h)) {
-               *len = 0;
-               free(s); return 0;
-       }
+       name_end = l = strlen(str);
+       s = (char*)malloc(l+1);
+       // remove space
+       for (i = k = 0; i < l; ++i)
+               if (!isspace(str[i])) s[k++] = str[i];
+       s[k] = 0; l = k;
+       // determine the sequence name
+       for (i = l - 1; i >= 0; --i) if (s[i] == ':') break; // look for colon from the end
+       if (i >= 0) name_end = i;
+       if (name_end < l) { // check if this is really the end
+               int n_hyphen = 0;
+               for (i = name_end + 1; i < l; ++i) {
+                       if (s[i] == '-') ++n_hyphen;
+                       else if (!isdigit(s[i]) && s[i] != ',') break;
+               }
+               if (i < l || n_hyphen > 1) name_end = l; // malformated region string; then take str as the name
+               s[name_end] = 0;
+               iter = kh_get(s, h, s);
+               if (iter == kh_end(h)) { // cannot find the sequence name
+                       iter = kh_get(s, h, str); // try str as the name
+                       if (iter == kh_end(h)) {
+                               *len = 0;
+                       free(s); return 0;
+                       } else s[name_end] = ':', name_end = l;
+               }
+       } else iter = kh_get(s, h, str);
        val = kh_value(h, iter);
-       if (i == k) { /* dump the whole sequence */
-               beg = 0; end = val.len;
-       } else {
-               for (p = s + i + 1; i != k; ++i) if (s[i] == '-') break;
-               beg = atoi(p);
-               if (i < k) {
-                       p = s + i + 1;
-                       end = atoi(p);
-               } else end = val.len;
-       }
-       if (beg > 0) --beg;
+       // parse the interval
+       if (name_end < l) {
+               for (i = k = name_end + 1; i < l; ++i)
+                       if (s[i] != ',') s[k++] = s[i];
+               s[k] = 0;
+               beg = atoi(s + name_end + 1);
+               for (i = name_end + 1; i != k; ++i) if (s[i] == '-') break;
+               end = i < k? atoi(s + i + 1) : val.len;
+               if (beg > 0) --beg;
+       } else beg = 0, end = val.len;
        if (beg >= val.len) beg = val.len;
        if (end >= val.len) end = val.len;
        if (beg > end) beg = end;
diff --git a/samtools/glf.c.pysam.c b/samtools/glf.c.pysam.c
deleted file mode 100644 (file)
index 099d4ac..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-#include "pysam.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include "glf.h"
-
-#ifdef _NO_BGZF
-// then alias bgzf_*() functions
-#endif
-
-static int glf3_is_BE = 0;
-
-static inline uint32_t bam_swap_endian_4(uint32_t v)
-{
-       v = ((v & 0x0000FFFFU) << 16) | (v >> 16);
-       return ((v & 0x00FF00FFU) << 8) | ((v & 0xFF00FF00U) >> 8);
-}
-
-static inline uint16_t bam_swap_endian_2(uint16_t v)
-{
-       return (uint16_t)(((v & 0x00FF00FFU) << 8) | ((v & 0xFF00FF00U) >> 8));
-}
-
-static inline int bam_is_big_endian()
-{
-       long one= 1;
-       return !(*((char *)(&one)));
-}
-
-glf3_header_t *glf3_header_init()
-{
-       glf3_is_BE = bam_is_big_endian();
-       return (glf3_header_t*)calloc(1, sizeof(glf3_header_t));
-}
-
-glf3_header_t *glf3_header_read(glfFile fp)
-{
-       glf3_header_t *h;
-       char magic[4];
-       h = glf3_header_init();
-       bgzf_read(fp, magic, 4);
-       if (strncmp(magic, "GLF\3", 4)) {
-               fprintf(pysamerr, "[glf3_header_read] invalid magic.\n");
-               glf3_header_destroy(h);
-               return 0;
-       }
-       bgzf_read(fp, &h->l_text, 4);
-       if (glf3_is_BE) h->l_text = bam_swap_endian_4(h->l_text);
-       if (h->l_text) {
-               h->text = (uint8_t*)calloc(h->l_text + 1, 1);
-               bgzf_read(fp, h->text, h->l_text);
-       }
-       return h;
-}
-
-void glf3_header_write(glfFile fp, const glf3_header_t *h)
-{
-       int32_t x;
-       bgzf_write(fp, "GLF\3", 4);
-       x = glf3_is_BE? bam_swap_endian_4(h->l_text) : h->l_text;
-       bgzf_write(fp, &x, 4);
-       if (h->l_text) bgzf_write(fp, h->text, h->l_text);
-}
-
-void glf3_header_destroy(glf3_header_t *h)
-{
-       free(h->text);
-       free(h);
-}
-
-char *glf3_ref_read(glfFile fp, int *len)
-{
-       int32_t n, x;
-       char *str;
-       *len = 0;
-       if (bgzf_read(fp, &n, 4) != 4) return 0;
-       if (glf3_is_BE) n = bam_swap_endian_4(n);
-       if (n < 0) {
-               fprintf(pysamerr, "[glf3_ref_read] invalid reference name length: %d.\n", n);
-               return 0;
-       }
-       str = (char*)calloc(n + 1, 1); // not necesarily n+1 in fact
-       x = bgzf_read(fp, str, n);
-       x += bgzf_read(fp, len, 4);
-       if (x != n + 4) {
-               free(str); *len = -1; return 0; // truncated
-       }
-       if (glf3_is_BE) *len = bam_swap_endian_4(*len);
-       return str;
-}
-
-void glf3_ref_write(glfFile fp, const char *str, int len)
-{
-       int32_t m, n = strlen(str) + 1;
-       m = glf3_is_BE? bam_swap_endian_4(n) : n;
-       bgzf_write(fp, &m, 4);
-       bgzf_write(fp, str, n);
-       if (glf3_is_BE) len = bam_swap_endian_4(len);
-       bgzf_write(fp, &len, 4);
-}
-
-void glf3_view1(const char *ref_name, const glf3_t *g3, int pos)
-{
-       int j;
-       if (g3->rtype == GLF3_RTYPE_END) return;
-       printf("%s\t%d\t%c\t%d\t%d\t%d", ref_name, pos + 1,
-                  g3->rtype == GLF3_RTYPE_INDEL? '*' : "XACMGRSVTWYHKDBN"[g3->ref_base],
-                  g3->depth, g3->rms_mapQ, g3->min_lk);
-       if (g3->rtype == GLF3_RTYPE_SUB)
-               for (j = 0; j != 10; ++j) printf("\t%d", g3->lk[j]);
-       else {
-               printf("\t%d\t%d\t%d\t%d\t%d\t%s\t%s\t", g3->lk[0], g3->lk[1], g3->lk[2], g3->indel_len[0], g3->indel_len[1],
-                          g3->indel_len[0]? g3->indel_seq[0] : "*", g3->indel_len[1]? g3->indel_seq[1] : "*");
-       }
-       printf("\n");
-}
-
-int glf3_write1(glfFile fp, const glf3_t *g3)
-{
-       int r;
-       uint8_t c;
-       uint32_t y[2];
-       c = g3->rtype<<4 | g3->ref_base;
-       r = bgzf_write(fp, &c, 1);
-       if (g3->rtype == GLF3_RTYPE_END) return r;
-       y[0] = g3->offset;
-       y[1] = g3->min_lk<<24 | g3->depth;
-       if (glf3_is_BE) {
-               y[0] = bam_swap_endian_4(y[0]);
-               y[1] = bam_swap_endian_4(y[1]);
-       }
-       r += bgzf_write(fp, y, 8);
-       r += bgzf_write(fp, &g3->rms_mapQ, 1);
-       if (g3->rtype == GLF3_RTYPE_SUB) r += bgzf_write(fp, g3->lk, 10);
-       else {
-               int16_t x[2];
-               r += bgzf_write(fp, g3->lk, 3);
-               x[0] = glf3_is_BE? bam_swap_endian_2(g3->indel_len[0]) : g3->indel_len[0];
-               x[1] = glf3_is_BE? bam_swap_endian_2(g3->indel_len[1]) : g3->indel_len[1];
-               r += bgzf_write(fp, x, 4);
-               if (g3->indel_len[0]) r += bgzf_write(fp, g3->indel_seq[0], abs(g3->indel_len[0]));
-               if (g3->indel_len[1]) r += bgzf_write(fp, g3->indel_seq[1], abs(g3->indel_len[1]));
-       }
-       return r;
-}
-
-#ifndef kv_roundup32
-#define kv_roundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
-#endif
-
-int glf3_read1(glfFile fp, glf3_t *g3)
-{
-       int r;
-       uint8_t c;
-       uint32_t y[2];
-       r = bgzf_read(fp, &c, 1);
-       if (r == 0) return 0;
-       g3->ref_base = c & 0xf;
-       g3->rtype = c>>4;
-       if (g3->rtype == GLF3_RTYPE_END) return r;
-       r += bgzf_read(fp, y, 8);
-       if (glf3_is_BE) {
-               y[0] = bam_swap_endian_4(y[0]);
-               y[1] = bam_swap_endian_4(y[1]);
-       }
-       g3->offset = y[0];
-       g3->min_lk = y[1]>>24;
-       g3->depth = y[1]<<8>>8;
-       r += bgzf_read(fp, &g3->rms_mapQ, 1);
-       if (g3->rtype == GLF3_RTYPE_SUB) r += bgzf_read(fp, g3->lk, 10);
-       else {
-               int16_t x[2], max;
-               r += bgzf_read(fp, g3->lk, 3);
-               r += bgzf_read(fp, x, 4);
-               if (glf3_is_BE) {
-                       x[0] = bam_swap_endian_2(x[0]);
-                       x[1] = bam_swap_endian_2(x[1]);
-               }
-               g3->indel_len[0] = x[0];
-               g3->indel_len[1] = x[1];
-               x[0] = abs(x[0]); x[1] = abs(x[1]);
-               max = (x[0] > x[1]? x[0] : x[1]) + 1;
-               if (g3->max_len < max) {
-                       g3->max_len = max;
-                       kv_roundup32(g3->max_len);
-                       g3->indel_seq[0] = (char*)realloc(g3->indel_seq[0], g3->max_len);
-                       g3->indel_seq[1] = (char*)realloc(g3->indel_seq[1], g3->max_len);
-               }
-               r += bgzf_read(fp, g3->indel_seq[0], x[0]);
-               r += bgzf_read(fp, g3->indel_seq[1], x[1]);
-               g3->indel_seq[0][x[0]] = g3->indel_seq[1][x[1]] = 0;
-       }
-       return r;
-}
-
-void glf3_view(glfFile fp)
-{
-       glf3_header_t *h;
-       char *name;
-       glf3_t *g3;
-       int len;
-       h = glf3_header_read(fp);
-       g3 = glf3_init1();
-       while ((name = glf3_ref_read(fp, &len)) != 0) {
-               int pos = 0;
-               while (glf3_read1(fp, g3) && g3->rtype != GLF3_RTYPE_END) {
-                       pos += g3->offset;
-                       glf3_view1(name, g3, pos);
-               }
-               free(name);
-       }
-       glf3_header_destroy(h);
-       glf3_destroy1(g3);
-}
-
-int glf3_view_main(int argc, char *argv[])
-{
-       glfFile fp;
-       if (argc == 1) {
-               fprintf(pysamerr, "Usage: glfview <in.glf>\n");
-               return 1;
-       }
-       fp = (strcmp(argv[1], "-") == 0)? bgzf_fdopen(fileno(stdin), "r") : bgzf_open(argv[1], "r");
-       if (fp == 0) {
-               fprintf(pysamerr, "Fail to open file '%s'\n", argv[1]);
-               return 1;
-       }
-       glf3_view(fp);
-       bgzf_close(fp);
-       return 0;
-}
-
-#ifdef GLFVIEW_MAIN
-int main(int argc, char *argv[])
-{
-       return glf3_view_main(argc, argv);
-}
-#endif
diff --git a/samtools/glf.h b/samtools/glf.h
deleted file mode 100644 (file)
index 12e5400..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef GLF_H_
-#define GLF_H_
-
-typedef struct {
-       unsigned char ref_base:4, dummy:4; /** "XACMGRSVTWYHKDBN"[ref_base] gives the reference base */
-       unsigned char max_mapQ; /** maximum mapping quality */
-       unsigned char lk[10];   /** log likelihood ratio, capped at 255 */
-       unsigned min_lk:8, depth:24; /** minimum lk capped at 255, and the number of mapped reads */
-} glf1_t;
-
-#include <stdint.h>
-#include "bgzf.h"
-typedef BGZF *glfFile;
-
-#define GLF3_RTYPE_END   0
-#define GLF3_RTYPE_SUB   1
-#define GLF3_RTYPE_INDEL 2
-
-typedef struct {
-       uint8_t ref_base:4, rtype:4; /** "XACMGRSVTWYHKDBN"[ref_base] gives the reference base */
-       uint8_t rms_mapQ; /** RMS mapping quality */
-       uint8_t lk[10];   /** log likelihood ratio, capped at 255 */
-       uint32_t min_lk:8, depth:24; /** minimum lk capped at 255, and the number of mapped reads */
-       int32_t offset; /** the first base in a chromosome has offset zero. */
-       // for indel (lkHom1, lkHom2 and lkHet are the first three elements in lk[10])
-       int16_t indel_len[2];
-       int32_t max_len; // maximum indel len; will be modified by glf3_read1()
-       char *indel_seq[2];
-} glf3_t;
-
-typedef struct {
-       int32_t l_text;
-       uint8_t *text;
-} glf3_header_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define glf3_init1() ((glf3_t*)calloc(1, sizeof(glf3_t)))
-#define glf3_destroy1(g3) do { free((g3)->indel_seq[0]); free((g3)->indel_seq[1]); free(g3); } while (0)
-
-       glf3_header_t *glf3_header_init();
-       glf3_header_t *glf3_header_read(glfFile fp);
-       void glf3_header_write(glfFile fp, const glf3_header_t *h);
-       void glf3_header_destroy(glf3_header_t *h);
-       char *glf3_ref_read(glfFile fp, int *len);
-       void glf3_ref_write(glfFile fp, const char *name, int len);
-       int glf3_write1(glfFile fp, const glf3_t *g3);
-       int glf3_read1(glfFile fp, glf3_t *g3);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index b87dcf07c831dc946900028fc1a2b3a073b404b5..3404936c70689012234e956e754844f1b5d0618e 100644 (file)
@@ -163,7 +163,7 @@ int kpa_glocal(const uint8_t *_ref, int l_ref, const uint8_t *_query, int l_quer
                double p = 1., Pr1 = 0.;
                for (i = 0; i <= l_query + 1; ++i) {
                        p *= s[i];
-                       if (p < 1e-100) Pr += -4.343 * log(p), p = 1.;
+                       if (p < 1e-100) Pr1 += -4.343 * log(p), p = 1.;
                }
                Pr1 += -4.343 * log(p * l_ref * l_query);
                Pr = (int)(Pr1 + .499);
index 82face095919a3991b1f927bb5422ffd95f102a4..0bbc7dc9370e910b19286167bd0862c64855387c 100644 (file)
@@ -1,6 +1,6 @@
 /* The MIT License
 
-   Copyright (c) 2008 Genome Research Ltd (GRL).
+   Copyright (c) 2008, 2009, 2011 Attractive Chaos <attractor@live.co.uk>
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
    SOFTWARE.
 */
 
-/* Contact: Heng Li <lh3@sanger.ac.uk> */
-
-/*
-  2009-07-16 (lh3): in kstream_t, change "char*" to "unsigned char*"
- */
-
-/* Last Modified: 12APR2009 */
+/* Last Modified: 18AUG2011 */
 
 #ifndef AC_KSEQ_H
 #define AC_KSEQ_H
@@ -94,10 +88,10 @@ typedef struct __kstring_t {
 #endif
 
 #define __KS_GETUNTIL(__read, __bufsize)                                                               \
-       static int ks_getuntil(kstream_t *ks, int delimiter, kstring_t *str, int *dret) \
+       static int ks_getuntil2(kstream_t *ks, int delimiter, kstring_t *str, int *dret, int append) \
        {                                                                                                                                       \
                if (dret) *dret = 0;                                                                                    \
-               str->l = 0;                                                                                                             \
+               str->l = append? str->l : 0;                                                                    \
                if (ks->begin >= ks->end && ks->is_eof) return -1;                              \
                for (;;) {                                                                                                              \
                        int i;                                                                                                          \
@@ -132,13 +126,15 @@ typedef struct __kstring_t {
                                break;                                                                                                  \
                        }                                                                                                                       \
                }                                                                                                                               \
-               if (str->l == 0) {                                                                                              \
+               if (str->s == 0) {                                                                                              \
                        str->m = 1;                                                                                                     \
                        str->s = (char*)calloc(1, 1);                                                           \
                }                                                                                                                               \
                str->s[str->l] = '\0';                                                                                  \
                return str->l;                                                                                                  \
-       }
+       } \
+       static inline int ks_getuntil(kstream_t *ks, int delimiter, kstring_t *str, int *dret) \
+       { return ks_getuntil2(ks, delimiter, str, dret, 0); }
 
 #define KSTREAM_INIT(type_t, __read, __bufsize) \
        __KS_TYPE(type_t)                                                       \
@@ -171,44 +167,45 @@ typedef struct __kstring_t {
    -1   end-of-file
    -2   truncated quality string
  */
-#define __KSEQ_READ                                                                                                            \
-       static int kseq_read(kseq_t *seq)                                                                       \
-       {                                                                                                                                       \
-               int c;                                                                                                                  \
-               kstream_t *ks = seq->f;                                                                                 \
+#define __KSEQ_READ \
+       static int kseq_read(kseq_t *seq) \
+       { \
+               int c; \
+               kstream_t *ks = seq->f; \
                if (seq->last_char == 0) { /* then jump to the next header line */ \
-                       while ((c = ks_getc(ks)) != -1 && c != '>' && c != '@');        \
-                       if (c == -1) return -1; /* end of file */                                       \
-                       seq->last_char = c;                                                                                     \
-               } /* the first header char has been read */                                             \
-               seq->comment.l = seq->seq.l = seq->qual.l = 0;                                  \
-               if (ks_getuntil(ks, 0, &seq->name, &c) < 0) return -1;                  \
-               if (c != '\n') ks_getuntil(ks, '\n', &seq->comment, 0);                 \
+                       while ((c = ks_getc(ks)) != -1 && c != '>' && c != '@'); \
+                       if (c == -1) return -1; /* end of file */ \
+                       seq->last_char = c; \
+               } /* else: the first header char has been read in the previous call */ \
+               seq->comment.l = seq->seq.l = seq->qual.l = 0; /* reset all members */ \
+               if (ks_getuntil(ks, 0, &seq->name, &c) < 0) return -1; /* normal exit: EOF */ \
+               if (c != '\n') ks_getuntil(ks, '\n', &seq->comment, 0); /* read FASTA/Q comment */ \
+               if (seq->seq.s == 0) { /* we can do this in the loop below, but that is slower */ \
+                       seq->seq.m = 256; \
+                       seq->seq.s = (char*)malloc(seq->seq.m); \
+               } \
                while ((c = ks_getc(ks)) != -1 && c != '>' && c != '+' && c != '@') { \
-                       if (isgraph(c)) { /* printable non-space character */           \
-                               if (seq->seq.l + 1 >= seq->seq.m) { /* double the memory */ \
-                                       seq->seq.m = seq->seq.l + 2;                                            \
-                                       kroundup32(seq->seq.m); /* rounded to next closest 2^k */ \
-                                       seq->seq.s = (char*)realloc(seq->seq.s, seq->seq.m); \
-                               }                                                                                                               \
-                               seq->seq.s[seq->seq.l++] = (char)c;                                             \
-                       }                                                                                                                       \
-               }                                                                                                                               \
+                       seq->seq.s[seq->seq.l++] = c; /* this is safe: we always have enough space for 1 char */ \
+                       ks_getuntil2(ks, '\n', &seq->seq, 0, 1); /* read the rest of the line */ \
+               } \
                if (c == '>' || c == '@') seq->last_char = c; /* the first header char has been read */ \
-               seq->seq.s[seq->seq.l] = 0;     /* null terminated string */            \
-               if (c != '+') return seq->seq.l; /* FASTA */                                    \
-               if (seq->qual.m < seq->seq.m) { /* allocate enough memory */    \
-                       seq->qual.m = seq->seq.m;                                                                       \
-                       seq->qual.s = (char*)realloc(seq->qual.s, seq->qual.m);         \
-               }                                                                                                                               \
+               if (seq->seq.l + 1 >= seq->seq.m) { /* seq->seq.s[seq->seq.l] below may be out of boundary */ \
+                       seq->seq.m = seq->seq.l + 2; \
+                       kroundup32(seq->seq.m); /* rounded to the next closest 2^k */ \
+                       seq->seq.s = (char*)realloc(seq->seq.s, seq->seq.m); \
+               } \
+               seq->seq.s[seq->seq.l] = 0;     /* null terminated string */ \
+               if (c != '+') return seq->seq.l; /* FASTA */ \
+               if (seq->qual.m < seq->seq.m) { /* allocate memory for qual in case insufficient */ \
+                       seq->qual.m = seq->seq.m; \
+                       seq->qual.s = (char*)realloc(seq->qual.s, seq->qual.m); \
+               } \
                while ((c = ks_getc(ks)) != -1 && c != '\n'); /* skip the rest of '+' line */ \
-               if (c == -1) return -2; /* we should not stop here */                   \
-               while ((c = ks_getc(ks)) != -1 && seq->qual.l < seq->seq.l)             \
-                       if (c >= 33 && c <= 127) seq->qual.s[seq->qual.l++] = (unsigned char)c; \
-               seq->qual.s[seq->qual.l] = 0; /* null terminated string */              \
+               if (c == -1) return -2; /* error: no quality string */ \
+               while (ks_getuntil2(ks, '\n', &seq->qual, 0, 1) >= 0 && seq->qual.l < seq->seq.l); \
                seq->last_char = 0;     /* we have not come to the next header line */ \
-               if (seq->seq.l != seq->qual.l) return -2; /* qual string is shorter than seq string */ \
-               return seq->seq.l;                                                                                              \
+               if (seq->seq.l != seq->qual.l) return -2; /* error: qual string is of a different length */ \
+               return seq->seq.l; \
        }
 
 #define __KSEQ_TYPE(type_t)                                            \
@@ -219,7 +216,7 @@ typedef struct __kstring_t {
        } kseq_t;
 
 #define KSEQ_INIT(type_t, __read)                              \
-       KSTREAM_INIT(type_t, __read, 4096)                      \
+       KSTREAM_INIT(type_t, __read, 16384)                     \
        __KSEQ_TYPE(type_t)                                                     \
        __KSEQ_BASIC(type_t)                                            \
        __KSEQ_READ
diff --git a/samtools/misc/seqtk.c.pysam.c b/samtools/misc/seqtk.c.pysam.c
new file mode 100644 (file)
index 0000000..46b3c56
--- /dev/null
@@ -0,0 +1,785 @@
+#include "pysam.h"
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <zlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+
+#include "kseq.h"
+KSEQ_INIT(gzFile, gzread)
+
+typedef struct {
+       int n, m;
+       uint64_t *a;
+} reglist_t;
+
+#include "khash.h"
+KHASH_MAP_INIT_STR(reg, reglist_t)
+
+typedef kh_reg_t reghash_t;
+
+reghash_t *stk_reg_read(const char *fn)
+{
+       reghash_t *h = kh_init(reg);
+       gzFile fp;
+       kstream_t *ks;
+       int dret;
+       kstring_t *str;
+       // read the list
+       str = calloc(1, sizeof(kstring_t));
+       fp = strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(fileno(stdin), "r");
+       ks = ks_init(fp);
+       while (ks_getuntil(ks, 0, str, &dret) >= 0) {
+               int beg = -1, end = -1;
+               reglist_t *p;
+               khint_t k = kh_get(reg, h, str->s);
+               if (k == kh_end(h)) {
+                       int ret;
+                       char *s = strdup(str->s);
+                       k = kh_put(reg, h, s, &ret);
+                       memset(&kh_val(h, k), 0, sizeof(reglist_t));
+               }
+               p = &kh_val(h, k);
+               if (dret != '\n') {
+                       if (ks_getuntil(ks, 0, str, &dret) > 0 && isdigit(str->s[0])) {
+                               beg = atoi(str->s);
+                               if (dret != '\n') {
+                                       if (ks_getuntil(ks, 0, str, &dret) > 0 && isdigit(str->s[0])) {
+                                               end = atoi(str->s);
+                                               if (end < 0) end = -1;
+                                       }
+                               }
+                       }
+               }
+               // skip the rest of the line
+               if (dret != '\n') while ((dret = ks_getc(ks)) > 0 && dret != '\n');
+               if (end < 0 && beg > 0) end = beg, beg = beg - 1; // if there is only one column
+               if (beg < 0) beg = 0, end = INT_MAX;
+               if (p->n == p->m) {
+                       p->m = p->m? p->m<<1 : 4;
+                       p->a = realloc(p->a, p->m * 8);
+               }
+               p->a[p->n++] = (uint64_t)beg<<32 | end;
+       }
+       ks_destroy(ks);
+       gzclose(fp);
+       free(str->s); free(str);
+       return h;
+}
+
+void stk_reg_destroy(reghash_t *h)
+{
+       khint_t k;
+       for (k = 0; k < kh_end(h); ++k) {
+               if (kh_exist(h, k)) {
+                       free(kh_val(h, k).a);
+                       free((char*)kh_key(h, k));
+               }
+       }
+       kh_destroy(reg, h);
+}
+
+/* constant table */
+
+unsigned char seq_nt16_table[256] = {
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15 /*'-'*/,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15, 1,14, 2, 13,15,15, 4, 11,15,15,12, 15, 3,15,15,
+       15,15, 5, 6,  8,15, 7, 9,  0,10,15,15, 15,15,15,15,
+       15, 1,14, 2, 13,15,15, 4, 11,15,15,12, 15, 3,15,15,
+       15,15, 5, 6,  8,15, 7, 9,  0,10,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+       15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15
+};
+
+char *seq_nt16_rev_table = "XACMGRSVTWYHKDBN";
+unsigned char seq_nt16to4_table[] = { 4, 0, 1, 4, 2, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4 };
+int bitcnt_table[] = { 4, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };
+
+/* composition */
+int stk_comp(int argc, char *argv[])
+{
+       gzFile fp;
+       kseq_t *seq;
+       int l, c, upper_only = 0;
+       reghash_t *h = 0;
+       reglist_t dummy;
+       while ((c = getopt(argc, argv, "ur:")) >= 0) {
+               switch (c) {
+                       case 'u': upper_only = 1; break;
+                       case 'r': h = stk_reg_read(optarg); break;
+               }
+       }
+       if (argc == optind) {
+               fprintf(pysamerr, "Usage:  seqtk comp [-u] [-r in.bed] <in.fa>\n\n");
+               fprintf(pysamerr, "Output format: chr, length, #A, #C, #G, #T, #2, #3, #4, #CpG, #tv, #ts, #CpG-ts\n");
+               return 1;
+       }
+       fp = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind], "r");
+       seq = kseq_init(fp);
+       dummy.n= dummy.m = 1; dummy.a = calloc(1, 8);
+       while ((l = kseq_read(seq)) >= 0) {
+               int i, k;
+               reglist_t *p = 0;
+               if (h) {
+                       khint_t k = kh_get(reg, h, seq->name.s);
+                       if (k != kh_end(h)) p = &kh_val(h, k);
+               } else {
+                       p = &dummy;
+                       dummy.a[0] = l;
+               }
+               for (k = 0; p && k < p->n; ++k) {
+                       int beg = p->a[k]>>32, end = p->a[k]&0xffffffff;
+                       int la, lb, lc, na, nb, nc, cnt[11];
+                       if (beg > 0) la = seq->seq.s[beg-1], lb = seq_nt16_table[la], lc = bitcnt_table[lb];
+                       else la = 'a', lb = -1, lc = 0;
+                       na = seq->seq.s[beg]; nb = seq_nt16_table[na]; nc = bitcnt_table[nb];
+                       memset(cnt, 0, 11 * sizeof(int));
+                       for (i = beg; i < end; ++i) {
+                               int is_CpG = 0, a, b, c;
+                               a = na; b = nb; c = nc;
+                               na = seq->seq.s[i+1]; nb = seq_nt16_table[na]; nc = bitcnt_table[nb];
+                               if (b == 2 || b == 10) { // C or Y
+                                       if (nb == 4 || nb == 5) is_CpG = 1;
+                               } else if (b == 4 || b == 5) { // G or R
+                                       if (lb == 2 || lb == 10) is_CpG = 1;
+                               }
+                               if (upper_only == 0 || isupper(a)) {
+                                       if (c > 1) ++cnt[c+2];
+                                       if (c == 1) ++cnt[seq_nt16to4_table[b]];
+                                       if (b == 10 || b == 5) ++cnt[9];
+                                       else if (c == 2) {
+                                               ++cnt[8];
+                                       }
+                                       if (is_CpG) {
+                                               ++cnt[7];
+                                               if (b == 10 || b == 5) ++cnt[10];
+                                       }
+                               }
+                               la = a; lb = b; lc = c;
+                       }
+                       if (h) printf("%s\t%d\t%d", seq->name.s, beg, end);
+                       else printf("%s\t%d", seq->name.s, l);
+                       for (i = 0; i < 11; ++i) printf("\t%d", cnt[i]);
+                       putchar('\n');
+               }
+               fflush(stdout);
+       }
+       free(dummy.a);
+       kseq_destroy(seq);
+       gzclose(fp);
+       return 0;
+}
+
+int stk_randbase(int argc, char *argv[])
+{
+       gzFile fp;
+       kseq_t *seq;
+       int l;
+       if (argc == 1) {
+               fprintf(pysamerr, "Usage: seqtk randbase <in.fa>\n");
+               return 1;
+       }
+       fp = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[1], "r");
+       seq = kseq_init(fp);
+       while ((l = kseq_read(seq)) >= 0) {
+               int i;
+               printf(">%s", seq->name.s);
+               for (i = 0; i < l; ++i) {
+                       int c, b, a, j, k, m;
+                       b = seq->seq.s[i];
+                       c = seq_nt16_table[b];
+                       a = bitcnt_table[c];
+                       if (a == 2) {
+                               m = (drand48() < 0.5);
+                               for (j = k = 0; j < 4; ++j) {
+                                       if ((1<<j & c) == 0) continue;
+                                       if (k == m) break;
+                                       ++k;
+                               }
+                               seq->seq.s[i] = islower(b)? "acgt"[j] : "ACGT"[j];
+                       }
+                       if (i%60 == 0) putchar('\n');
+                       putchar(seq->seq.s[i]);
+               }
+               putchar('\n');
+       }
+       kseq_destroy(seq);
+       gzclose(fp);
+       return 0;
+}
+
+int stk_hety(int argc, char *argv[])
+{
+       gzFile fp;
+       kseq_t *seq;
+       int l, c, win_size = 50000, n_start = 5, win_step, is_lower_mask = 0;
+       char *buf;
+       uint32_t cnt[3];
+       if (argc == 1) {
+               fprintf(pysamerr, "\n");
+               fprintf(pysamerr, "Usage:   seqtk hety [options] <in.fa>\n\n");
+               fprintf(pysamerr, "Options: -w INT   window size [%d]\n", win_size);
+               fprintf(pysamerr, "         -t INT   # start positions in a window [%d]\n", n_start);
+               fprintf(pysamerr, "         -m       treat lowercases as masked\n");
+               fprintf(pysamerr, "\n");
+               return 1;
+       }
+       while ((c = getopt(argc, argv, "w:t:m")) >= 0) {
+               switch (c) {
+               case 'w': win_size = atoi(optarg); break;
+               case 't': n_start = atoi(optarg); break;
+               case 'm': is_lower_mask = 1; break;
+               }
+       }
+       fp = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind], "r");
+       seq = kseq_init(fp);
+       win_step = win_size / n_start;
+       buf = calloc(win_size, 1);
+       while ((l = kseq_read(seq)) >= 0) {
+               int x, i, y, z, next = 0;
+               cnt[0] = cnt[1] = cnt[2] = 0;
+               for (i = 0; i <= l; ++i) {
+                       if ((i >= win_size && i % win_step == 0) || i == l) {
+                               if (i == l && l >= win_size) {
+                                       for (y = l - win_size; y < next; ++y) --cnt[(int)buf[y % win_size]];
+                               }
+                               if (cnt[1] + cnt[2] > 0)
+                                       printf("%s\t%d\t%d\t%.2lf\t%d\t%d\n", seq->name.s, next, i,
+                                                  (double)cnt[2] / (cnt[1] + cnt[2]) * win_size, cnt[1] + cnt[2], cnt[2]);
+                               next = i;
+                       }
+                       if (i < l) {
+                               y = i % win_size;
+                               c = seq->seq.s[i];
+                               if (is_lower_mask && islower(c)) c = 'N';
+                               c = seq_nt16_table[c];
+                               x = bitcnt_table[c];
+                               if (i >= win_size) --cnt[(int)buf[y]];
+                               buf[y] = z = x > 2? 0 : x == 2? 2 : 1;
+                               ++cnt[z];
+                       }
+               }
+       }
+       free(buf);
+       kseq_destroy(seq);
+       gzclose(fp);
+       return 0;
+}
+
+/* fq2fa */
+int stk_fq2fa(int argc, char *argv[])
+{
+       gzFile fp;
+       kseq_t *seq;
+       char *buf;
+       int l, i, c, qual_thres = 0, linelen = 60;
+       while ((c = getopt(argc, argv, "q:l:")) >= 0) {
+               switch (c) {
+                       case 'q': qual_thres = atoi(optarg); break;
+                       case 'l': linelen = atoi(optarg); break;
+               }
+       }
+       if (argc == optind) {
+               fprintf(pysamerr, "Usage: seqtk fq2fa [-q qualThres=0] [-l lineLen=60] <in.fq>\n");
+               return 1;
+       }
+       buf = linelen > 0? malloc(linelen + 1) : 0;
+       fp = strcmp(argv[optind], "-")? gzopen(argv[optind], "r") : gzdopen(fileno(stdin), "r");
+       seq = kseq_init(fp);
+       while ((l = kseq_read(seq)) >= 0) {
+               if (seq->qual.l && qual_thres > 0) {
+                       for (i = 0; i < l; ++i)
+                               if (seq->qual.s[i] - 33 < qual_thres)
+                                       seq->seq.s[i] = tolower(seq->seq.s[i]);
+               }
+               putchar('>');
+               if (seq->comment.l) {
+                       fputs(seq->name.s, stdout);
+                       putchar(' ');
+                       puts(seq->comment.s);
+               } else puts(seq->name.s);
+               if (buf) { // multi-line
+                       for (i = 0; i < l; i += linelen) {
+                               int x = i + linelen < l? linelen : l - i;
+                               memcpy(buf, seq->seq.s + i, x);
+                               buf[x] = 0;
+                               puts(buf);
+                       }
+               } else puts(seq->seq.s);
+       }
+       free(buf);
+       kseq_destroy(seq);
+       gzclose(fp);
+       return 0;
+}
+
+int stk_maskseq(int argc, char *argv[])
+{
+       khash_t(reg) *h = kh_init(reg);
+       gzFile fp;
+       kseq_t *seq;
+       int l, i, j, c, is_complement = 0, is_lower = 0;
+       khint_t k;
+       while ((c = getopt(argc, argv, "cl")) >= 0) {
+               switch (c) {
+               case 'c': is_complement = 1; break;
+               case 'l': is_lower = 1; break;
+               }
+       }
+       if (argc - optind < 2) {
+               fprintf(pysamerr, "Usage:   seqtk maskseq [-cl] <in.fa> <in.bed>\n\n");
+               fprintf(pysamerr, "Options: -c     mask the complement regions\n");
+               fprintf(pysamerr, "         -l     soft mask (to lower cases)\n");
+               return 1;
+       }
+       h = stk_reg_read(argv[optind+1]);
+       // maskseq
+       fp = strcmp(argv[optind], "-")? gzopen(argv[optind], "r") : gzdopen(fileno(stdin), "r");
+       seq = kseq_init(fp);
+       while ((l = kseq_read(seq)) >= 0) {
+               k = kh_get(reg, h, seq->name.s);
+               if (k == kh_end(h)) { // not found in the hash table
+                       if (is_complement) {
+                               for (j = 0; j < l; ++j)
+                                       seq->seq.s[j] = is_lower? tolower(seq->seq.s[j]) : 'N';
+                       }
+               } else {
+                       reglist_t *p = &kh_val(h, k);
+                       if (!is_complement) {
+                               for (i = 0; i < p->n; ++i) {
+                                       int beg = p->a[i]>>32, end = p->a[i];
+                                       if (beg >= seq->seq.l) {
+                                               fprintf(pysamerr, "[maskseq] start position >= the sequence length.\n");
+                                               continue;
+                                       }
+                                       if (end >= seq->seq.l) end = seq->seq.l;
+                                       if (is_lower) for (j = beg; j < end; ++j) seq->seq.s[j] = tolower(seq->seq.s[j]);
+                                       else for (j = beg; j < end; ++j) seq->seq.s[j] = 'N';
+                               }
+                       } else {
+                               int8_t *mask = calloc(seq->seq.l, 1);
+                               for (i = 0; i < p->n; ++i) {
+                                       int beg = p->a[i]>>32, end = p->a[i];
+                                       if (end >= seq->seq.l) end = seq->seq.l;
+                                       for (j = beg; j < end; ++j) mask[j] = 1;
+                               }
+                               for (j = 0; j < l; ++j)
+                                       if (mask[j] == 0) seq->seq.s[j] = is_lower? tolower(seq->seq.s[j]) : 'N';
+                               free(mask);
+                       }
+               }
+               printf(">%s", seq->name.s);
+               for (j = 0; j < seq->seq.l; ++j) {
+                       if (j%60 == 0) putchar('\n');
+                       putchar(seq->seq.s[j]);
+               }
+               putchar('\n');
+       }
+       // free
+       kseq_destroy(seq);
+       gzclose(fp);
+       stk_reg_destroy(h);
+       return 0;
+}
+
+/* subseq */
+
+int stk_subseq(int argc, char *argv[])
+{
+       khash_t(reg) *h = kh_init(reg);
+       gzFile fp;
+       kseq_t *seq;
+       int l, i, j, c, is_tab = 0;
+       khint_t k;
+       while ((c = getopt(argc, argv, "t")) >= 0) {
+               switch (c) {
+               case 't': is_tab = 1; break;
+               }
+       }
+       if (optind + 2 > argc) {
+               fprintf(pysamerr, "Usage: seqtk subseq [-t] <in.fa> <in.bed>\n\n");
+               fprintf(pysamerr, "Note: Use 'samtools faidx' if only a few regions are intended.\n");
+               return 1;
+       }
+       h = stk_reg_read(argv[optind+1]);
+       // subseq
+       fp = strcmp(argv[optind], "-")? gzopen(argv[optind], "r") : gzdopen(fileno(stdin), "r");
+       seq = kseq_init(fp);
+       while ((l = kseq_read(seq)) >= 0) {
+               reglist_t *p;
+               k = kh_get(reg, h, seq->name.s);
+               if (k == kh_end(h)) continue;
+               p = &kh_val(h, k);
+               for (i = 0; i < p->n; ++i) {
+                       int beg = p->a[i]>>32, end = p->a[i];
+                       if (beg >= seq->seq.l) {
+                               fprintf(pysamerr, "[subseq] %s: %d >= %ld\n", seq->name.s, beg, seq->seq.l);
+                               continue;
+                       }
+                       if (end > seq->seq.l) end = seq->seq.l;
+                       if (is_tab == 0) {
+                               printf("%c%s", seq->qual.l == seq->seq.l? '@' : '>', seq->name.s);
+                               if (end == INT_MAX) {
+                                       if (beg) printf(":%d", beg+1);
+                               } else printf(":%d-%d", beg+1, end);
+                       } else printf("%s\t%d\t", seq->name.s, beg + 1);
+                       if (end > seq->seq.l) end = seq->seq.l;
+                       for (j = 0; j < end - beg; ++j) {
+                               if (is_tab == 0 && j % 60 == 0) putchar('\n');
+                               putchar(seq->seq.s[j + beg]);
+                       }
+                       putchar('\n');
+                       if (seq->qual.l != seq->seq.l || is_tab) continue;
+                       printf("+");
+                       for (j = 0; j < end - beg; ++j) {
+                               if (j % 60 == 0) putchar('\n');
+                               putchar(seq->qual.s[j + beg]);
+                       }
+                       putchar('\n');
+               }
+       }
+       // free
+       kseq_destroy(seq);
+       gzclose(fp);
+       stk_reg_destroy(h);
+       return 0;
+}
+
+/* mergefa */
+int stk_mergefa(int argc, char *argv[])
+{
+       gzFile fp[2];
+       kseq_t *seq[2];
+       int i, l, c, is_intersect = 0, is_haploid = 0, qual = 0, is_mask = 0;
+       while ((c = getopt(argc, argv, "himq:")) >= 0) {
+               switch (c) {
+                       case 'i': is_intersect = 1; break;
+                       case 'h': is_haploid = 1; break;
+                       case 'm': is_mask = 1; break;
+                       case 'q': qual = atoi(optarg); break;
+               }
+       }
+       if (is_mask && is_intersect) {
+               fprintf(pysamerr, "[%s] `-i' and `-h' cannot be applied at the same time.\n", __func__);
+               return 1;
+       }
+       if (optind + 2 > argc) {
+               fprintf(pysamerr, "\nUsage: seqtk mergefa [options] <in1.fa> <in2.fa>\n\n");
+               fprintf(pysamerr, "Options: -q INT   quality threshold [0]\n");
+               fprintf(pysamerr, "         -i       take intersection\n");
+               fprintf(pysamerr, "         -m       convert to lowercase when one of the input base is N.\n");
+               fprintf(pysamerr, "         -h       suppress hets in the input\n\n");
+               return 1;
+       }
+       for (i = 0; i < 2; ++i) {
+               fp[i] = strcmp(argv[optind+i], "-")? gzopen(argv[optind+i], "r") : gzdopen(fileno(stdin), "r");
+               seq[i] = kseq_init(fp[i]);
+       }
+       while (kseq_read(seq[0]) >= 0) {
+               int min_l, c[2], is_upper;
+               kseq_read(seq[1]);
+               if (strcmp(seq[0]->name.s, seq[1]->name.s))
+                       fprintf(pysamerr, "[%s] Different sequence names: %s != %s\n", __func__, seq[0]->name.s, seq[1]->name.s);
+               if (seq[0]->seq.l != seq[1]->seq.l)
+                       fprintf(pysamerr, "[%s] Unequal sequence length: %ld != %ld\n", __func__, seq[0]->seq.l, seq[1]->seq.l);
+               min_l = seq[0]->seq.l < seq[1]->seq.l? seq[0]->seq.l : seq[1]->seq.l;
+               printf(">%s", seq[0]->name.s);
+               for (l = 0; l < min_l; ++l) {
+                       c[0] = seq[0]->seq.s[l]; c[1] = seq[1]->seq.s[l];
+                       if (seq[0]->qual.l && seq[0]->qual.s[l] - 33 < qual) c[0] = tolower(c[0]);
+                       if (seq[1]->qual.l && seq[1]->qual.s[l] - 33 < qual) c[1] = tolower(c[1]);
+                       if (is_intersect) is_upper = (isupper(c[0]) || isupper(c[1]))? 1 : 0;
+                       else if (is_mask) is_upper = (isupper(c[0]) || isupper(c[1]))? 1 : 0;
+                       else is_upper = (isupper(c[0]) && isupper(c[1]))? 1 : 0;
+                       c[0] = seq_nt16_table[c[0]]; c[1] = seq_nt16_table[c[1]];
+                       if (c[0] == 0) c[0] = 15;
+                       if (c[1] == 0) c[1] = 15;
+                       if (is_haploid && (bitcnt_table[c[0]] > 1 || bitcnt_table[c[1]] > 1)) is_upper = 0;
+                       if (is_intersect) {
+                               c[0] = c[0] & c[1];
+                               if (c[0] == 0) is_upper = 0;
+                       } else if (is_mask) {
+                               if (c[0] == 15 || c[1] == 15) is_upper = 0;
+                               c[0] = c[0] & c[1];
+                               if (c[0] == 0) is_upper = 0;
+                       } else c[0] = c[0] | c[1];
+                       c[0] = seq_nt16_rev_table[c[0]];
+                       if (!is_upper) c[0] = tolower(c[0]);
+                       if (l%60 == 0) putchar('\n');
+                       putchar(c[0]);
+               }
+               putchar('\n');
+       }
+       return 0;
+}
+
+int stk_famask(int argc, char *argv[])
+{
+       gzFile fp[2];
+       kseq_t *seq[2];
+       int i, l;
+       if (argc < 3) {
+               fprintf(pysamerr, "Usage: seqtk famask <src.fa> <mask.fa>\n");
+               return 1;
+       }
+       for (i = 0; i < 2; ++i) {
+               fp[i] = strcmp(argv[optind+i], "-")? gzopen(argv[optind+i], "r") : gzdopen(fileno(stdin), "r");
+               seq[i] = kseq_init(fp[i]);
+       }
+       while (kseq_read(seq[0]) >= 0) {
+               int min_l, c[2];
+               kseq_read(seq[1]);
+               if (strcmp(seq[0]->name.s, seq[1]->name.s))
+                       fprintf(pysamerr, "[%s] Different sequence names: %s != %s\n", __func__, seq[0]->name.s, seq[1]->name.s);
+               if (seq[0]->seq.l != seq[1]->seq.l)
+                       fprintf(pysamerr, "[%s] Unequal sequence length: %ld != %ld\n", __func__, seq[0]->seq.l, seq[1]->seq.l);
+               min_l = seq[0]->seq.l < seq[1]->seq.l? seq[0]->seq.l : seq[1]->seq.l;
+               printf(">%s", seq[0]->name.s);
+               for (l = 0; l < min_l; ++l) {
+                       c[0] = seq[0]->seq.s[l]; c[1] = seq[1]->seq.s[l];
+                       if (c[1] == 'x') c[0] = tolower(c[0]);
+                       else if (c[1] != 'X') c[0] = c[1];
+                       if (l%60 == 0) putchar('\n');
+                       putchar(c[0]);
+               }
+               putchar('\n');
+       }
+       return 0;
+}
+
+int stk_mutfa(int argc, char *argv[])
+{
+       khash_t(reg) *h = kh_init(reg);
+       gzFile fp;
+       kseq_t *seq;
+       kstream_t *ks;
+       int l, i, dret;
+       kstring_t *str;
+       khint_t k;
+       if (argc < 3) {
+               fprintf(pysamerr, "Usage: seqtk mutfa <in.fa> <in.snp>\n\n");
+               fprintf(pysamerr, "Note: <in.snp> contains at least four columns per line which are:\n");
+               fprintf(pysamerr, "      'chr  1-based-pos  any  base-changed-to'.\n");
+               return 1;
+       }
+       // read the list
+       str = calloc(1, sizeof(kstring_t));
+       fp = strcmp(argv[2], "-")? gzopen(argv[2], "r") : gzdopen(fileno(stdin), "r");
+       ks = ks_init(fp);
+       while (ks_getuntil(ks, 0, str, &dret) >= 0) {
+               char *s = strdup(str->s);
+               int beg = 0, ret;
+               reglist_t *p;
+               k = kh_get(reg, h, s);
+               if (k == kh_end(h)) {
+                       k = kh_put(reg, h, s, &ret);
+                       memset(&kh_val(h, k), 0, sizeof(reglist_t));
+               }
+               p = &kh_val(h, k);
+               if (ks_getuntil(ks, 0, str, &dret) > 0) beg = atol(str->s) - 1; // 2nd col
+               ks_getuntil(ks, 0, str, &dret); // 3rd col
+               ks_getuntil(ks, 0, str, &dret); // 4th col
+               // skip the rest of the line
+               if (dret != '\n') while ((dret = ks_getc(ks)) > 0 && dret != '\n');
+               if (isalpha(str->s[0]) && str->l == 1) {
+                       if (p->n == p->m) {
+                               p->m = p->m? p->m<<1 : 4;
+                               p->a = realloc(p->a, p->m * 8);
+                       }
+                       p->a[p->n++] = (uint64_t)beg<<32 | str->s[0];
+               }
+       }
+       ks_destroy(ks);
+       gzclose(fp);
+       free(str->s); free(str);
+       // mutfa
+       fp = strcmp(argv[1], "-")? gzopen(argv[1], "r") : gzdopen(fileno(stdin), "r");
+       seq = kseq_init(fp);
+       while ((l = kseq_read(seq)) >= 0) {
+               reglist_t *p;
+               k = kh_get(reg, h, seq->name.s);
+               if (k != kh_end(h)) {
+                       p = &kh_val(h, k);
+                       for (i = 0; i < p->n; ++i) {
+                               int beg = p->a[i]>>32;
+                               if (beg < seq->seq.l)
+                                       seq->seq.s[beg] = (int)p->a[i];
+                       }
+               }
+               printf(">%s", seq->name.s);
+               for (i = 0; i < l; ++i) {
+                       if (i%60 == 0) putchar('\n');
+                       putchar(seq->seq.s[i]);
+               }
+               putchar('\n');
+       }
+       // free
+       kseq_destroy(seq);
+       gzclose(fp);
+       for (k = 0; k < kh_end(h); ++k) {
+               if (kh_exist(h, k)) {
+                       free(kh_val(h, k).a);
+                       free((char*)kh_key(h, k));
+               }
+       }
+       kh_destroy(reg, h);
+       return 0;
+}
+
+int stk_listhet(int argc, char *argv[])
+{
+       gzFile fp;
+       kseq_t *seq;
+       int i, l;
+       if (argc == 1) {
+               fprintf(pysamerr, "Usage: seqtk listhet <in.fa>\n");
+               return 1;
+       }
+       fp = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[1], "r");
+       seq = kseq_init(fp);
+       while ((l = kseq_read(seq)) >= 0) {
+               for (i = 0; i < l; ++i) {
+                       int b = seq->seq.s[i];
+                       if (bitcnt_table[seq_nt16_table[b]] == 2)
+                               printf("%s\t%d\t%c\n", seq->name.s, i+1, b);
+               }
+       }
+       kseq_destroy(seq);
+       gzclose(fp);
+       return 0;
+}
+
+/* cutN */
+static int cutN_min_N_tract = 1000;
+static int cutN_nonN_penalty = 10;
+
+static int find_next_cut(const kseq_t *ks, int k, int *begin, int *end)
+{
+       int i, b, e;
+       while (k < ks->seq.l) {
+               if (seq_nt16_table[(int)ks->seq.s[k]] == 15) {
+                       int score, max;
+                       score = 0; e = max = -1;
+                       for (i = k; i < ks->seq.l && score >= 0; ++i) { /* forward */
+                               if (seq_nt16_table[(int)ks->seq.s[i]] == 15) ++score;
+                               else score -= cutN_nonN_penalty;
+                               if (score > max) max = score, e = i;
+                       }
+                       score = 0; b = max = -1;
+                       for (i = e; i >= 0 && score >= 0; --i) { /* backward */
+                               if (seq_nt16_table[(int)ks->seq.s[i]] == 15) ++score;
+                               else score -= cutN_nonN_penalty;
+                               if (score > max) max = score, b = i;
+                       }
+                       if (e + 1 - b >= cutN_min_N_tract) {
+                               *begin = b;
+                               *end = e + 1;
+                               return *end;
+                       }
+                       k = e + 1;
+               } else ++k;
+       }
+       return -1;
+}
+static void print_seq(FILE *fpout, const kseq_t *ks, int begin, int end)
+{
+       int i;
+       if (begin >= end) return; // FIXME: why may this happen? Understand it!
+       fprintf(fpout, ">%s:%d-%d", ks->name.s, begin+1, end);
+       for (i = begin; i < end && i < ks->seq.l; ++i) {
+               if ((i - begin)%60 == 0) fputc('\n', fpout);
+               fputc(ks->seq.s[i], fpout);
+       }
+       fputc('\n', fpout);
+}
+int stk_cutN(int argc, char *argv[])
+{
+       int c, l, gap_only = 0;
+       gzFile fp;
+       kseq_t *ks;
+       while ((c = getopt(argc, argv, "n:p:g")) >= 0) {
+               switch (c) {
+               case 'n': cutN_min_N_tract = atoi(optarg); break;
+               case 'p': cutN_nonN_penalty = atoi(optarg); break;
+               case 'g': gap_only = 1; break;
+               default: return 1;
+               }
+       }
+       if (argc == optind) {
+               fprintf(pysamerr, "\n");
+               fprintf(pysamerr, "Usage:   seqtk cutN [options] <in.fa>\n\n");
+               fprintf(pysamerr, "Options: -n INT    min size of N tract [%d]\n", cutN_min_N_tract);
+               fprintf(pysamerr, "         -p INT    penalty for a non-N [%d]\n", cutN_nonN_penalty);
+               fprintf(pysamerr, "         -g        print gaps only, no sequence\n\n");
+               return 1;
+       }
+       fp = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind], "r");
+       ks = kseq_init(fp);
+       while ((l = kseq_read(ks)) >= 0) {
+               int k = 0, begin = 0, end = 0;
+               while (find_next_cut(ks, k, &begin, &end) >= 0) {
+                       if (begin != 0) {
+                               if (gap_only) printf("%s\t%d\t%d\n", ks->name.s, begin, end);
+                               else print_seq(stdout, ks, k, begin);
+                       }
+                       k = end;
+               }
+               if (!gap_only) print_seq(stdout, ks, k, l);
+       }
+       kseq_destroy(ks);
+       gzclose(fp);
+       return 0;
+}
+
+/* main function */
+static int usage()
+{
+       fprintf(pysamerr, "\n");
+       fprintf(pysamerr, "Usage:   seqtk <command> <arguments>\n\n");
+       fprintf(pysamerr, "Command: comp      get the nucleotide composite of FASTA/Q\n");
+       fprintf(pysamerr, "         hety      regional heterozygosity\n");
+       fprintf(pysamerr, "         fq2fa     convert FASTQ to FASTA\n");
+       fprintf(pysamerr, "         subseq    extract subsequences from FASTA/Q\n");
+       fprintf(pysamerr, "         maskseq   mask sequences\n");
+       fprintf(pysamerr, "         mutfa     point mutate FASTA at specified positions\n");
+       fprintf(pysamerr, "         mergefa   merge two FASTA/Q files\n");
+       fprintf(pysamerr, "         randbase  choose a random base from hets\n");
+       fprintf(pysamerr, "         cutN      cut sequence at long N\n");
+       fprintf(pysamerr, "         listhet   extract the position of each het\n");
+       fprintf(pysamerr, "\n");
+       return 1;
+}
+
+int main(int argc, char *argv[])
+{
+       if (argc == 1) return usage();
+       if (strcmp(argv[1], "comp") == 0) stk_comp(argc-1, argv+1);
+       else if (strcmp(argv[1], "hety") == 0) stk_hety(argc-1, argv+1);
+       else if (strcmp(argv[1], "fq2fa") == 0) stk_fq2fa(argc-1, argv+1);
+       else if (strcmp(argv[1], "subseq") == 0) stk_subseq(argc-1, argv+1);
+       else if (strcmp(argv[1], "maskseq") == 0) stk_maskseq(argc-1, argv+1);
+       else if (strcmp(argv[1], "mutfa") == 0) stk_mutfa(argc-1, argv+1);
+       else if (strcmp(argv[1], "mergefa") == 0) stk_mergefa(argc-1, argv+1);
+       else if (strcmp(argv[1], "randbase") == 0) stk_randbase(argc-1, argv+1);
+       else if (strcmp(argv[1], "cutN") == 0) stk_cutN(argc-1, argv+1);
+       else if (strcmp(argv[1], "listhet") == 0) stk_listhet(argc-1, argv+1);
+       else if (strcmp(argv[1], "famask") == 0) stk_famask(argc-1, argv+1);
+       else {
+               fprintf(pysamerr, "[main] unrecognized commad '%s'. Abort!\n", argv[1]);
+               return 1;
+       }
+       return 0;
+}
diff --git a/samtools/msvc_compat.h b/samtools/msvc_compat.h
deleted file mode 100644 (file)
index 624cc99..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Windows-specific code, include with:\r
-// #ifdef _MSC_VER\r
-// #include <msvc_compat.h>\r
-// #endif\r
-\r
-//#define _CRT_SECURE_NO_WARNINGS\r
-#ifndef MSVC_COMPAT_H\r
-#define MSVC_COMPAT_H\r
-\r
-#define inline __inline\r
-#define __func__ __FUNCTION__\r
-\r
-#include <float.h>\r
-#define isnan _isnan\r
-static int isinf(double x) {\r
-    int y = _finite(x);\r
-    if(y == 0) {\r
-       return 0;\r
-    } else {\r
-       return 1;\r
-    }\r
-}\r
-#define alloca _alloca\r
-#define atoll _atoi64\r
-\r
-#define ftello ftell\r
-
-typedef int bool;\r
-\r
-static int R_OK = 4;
-\r
-#ifndef lgamma\r
-/* Log gamma function\r
- * \log{\Gamma(z)}\r
- * AS245, 2nd algorithm, http://lib.stat.cmu.edu/apstat/245\r
- */\r
-static double lgamma(double z)\r
-{\r
-       double x = 0;\r
-       x += 0.1659470187408462e-06 / (z+7);\r
-       x += 0.9934937113930748e-05 / (z+6);\r
-       x -= 0.1385710331296526     / (z+5);\r
-       x += 12.50734324009056      / (z+4);\r
-       x -= 176.6150291498386      / (z+3);\r
-       x += 771.3234287757674      / (z+2);\r
-       x -= 1259.139216722289      / (z+1);\r
-       x += 676.5203681218835      / z;\r
-       x += 0.9999999999995183;\r
-       return log(x) - 5.58106146679532777 - z + (z-0.5) * log(z+6.5);\r
-}\r
-#endif\r
-\r
-#ifndef M_LN10\r
-#define        M_LN10   2.30258509299404568402\r
-#endif\r
-#ifndef M_LN2\r
-#define        M_LN2   0.69314718055994530942\r
-#endif\r
-
-#endif\r
index 2c4736336ee2e27150ce47d15d661e190c580888..05da8e3e5a51dd157b2ffcdb250e4b045f0a7e8c 100644 (file)
@@ -21,39 +21,28 @@ typedef struct {
 
 typedef khash_t(rg) *rghash_t;
 
+// FIXME: we'd better use no global variables...
 static rghash_t g_rghash = 0;
 static int g_min_mapQ = 0, g_flag_on = 0, g_flag_off = 0;
+static float g_subsam = -1;
 static char *g_library, *g_rg;
-static int g_sol2sanger_tbl[128];
 static void *g_bed;
 
 void *bed_read(const char *fn);
 void bed_destroy(void *_h);
 int bed_overlap(const void *_h, const char *chr, int beg, int end);
 
-static void sol2sanger(bam1_t *b)
-{
-       int l;
-       uint8_t *qual = bam1_qual(b);
-       if (g_sol2sanger_tbl[30] == 0) {
-               for (l = 0; l != 128; ++l) {
-                       g_sol2sanger_tbl[l] = (int)(10.0 * log(1.0 + pow(10.0, (l - 64 + 33) / 10.0)) / log(10.0) + .499);
-                       if (g_sol2sanger_tbl[l] >= 93) g_sol2sanger_tbl[l] = 93;
-               }
-       }
-       for (l = 0; l < b->core.l_qseq; ++l) {
-               int q = qual[l];
-               if (q > 127) q = 127;
-               qual[l] = g_sol2sanger_tbl[q];
-       }
-}
-
 static inline int __g_skip_aln(const bam_header_t *h, const bam1_t *b)
 {
        if (b->core.qual < g_min_mapQ || ((b->core.flag & g_flag_on) != g_flag_on) || (b->core.flag & g_flag_off))
                return 1;
        if (g_bed && b->core.tid >= 0 && !bed_overlap(g_bed, h->target_name[b->core.tid], b->core.pos, bam_calend(&b->core, bam1_cigar(b))))
                return 1;
+       if (g_subsam > 0.) {
+               int x = (int)(g_subsam + .499);
+               uint32_t k = __ac_X31_hash_string(bam1_qname(b)) + x;
+               if (k%1024 / 1024.0 >= g_subsam - x) return 1;
+       }
        if (g_rg || g_rghash) {
                uint8_t *s = bam_aux_get(b, "RG");
                if (s) {
@@ -123,7 +112,7 @@ static int usage(int is_long_help);
 
 int main_samview(int argc, char *argv[])
 {
-       int c, is_header = 0, is_header_only = 0, is_bamin = 1, ret = 0, compress_level = -1, is_bamout = 0, slx2sngr = 0, is_count = 0;
+       int c, is_header = 0, is_header_only = 0, is_bamin = 1, ret = 0, compress_level = -1, is_bamout = 0, is_count = 0;
        int of_type = BAM_OFDEC, is_long_help = 0;
        int count = 0;
        samfile_t *in = 0, *out = 0;
@@ -131,10 +120,10 @@ int main_samview(int argc, char *argv[])
 
        /* parse command-line options */
        strcpy(in_mode, "r"); strcpy(out_mode, "w");
-       while ((c = getopt(argc, argv, "Sbct:h1Ho:q:f:F:ul:r:xX?T:CR:L:")) >= 0) {
+       while ((c = getopt(argc, argv, "Sbct:h1Ho:q:f:F:ul:r:xX?T:R:L:s:")) >= 0) {
                switch (c) {
+               case 's': g_subsam = atof(optarg); break;
                case 'c': is_count = 1; break;
-               case 'C': slx2sngr = 1; break;
                case 'S': is_bamin = 0; break;
                case 'b': is_bamout = 1; break;
                case 't': fn_list = strdup(optarg); is_bamin = 0; break;
@@ -218,7 +207,6 @@ int main_samview(int argc, char *argv[])
                int r;
                while ((r = samread(in, b)) >= 0) { // read one alignment from `in'
                        if (!__g_skip_aln(in->header, b)) {
-                               if (slx2sngr) sol2sanger(b);
                                if (!is_count) samwrite(out, b); // write the alignment to `out'
                                count++;
                        }
@@ -301,6 +289,7 @@ static int usage(int is_long_help)
        fprintf(pysamerr, "         -q INT   minimum mapping quality [0]\n");
        fprintf(pysamerr, "         -l STR   only output reads in library STR [null]\n");
        fprintf(pysamerr, "         -r STR   only output reads in read group STR [null]\n");
+       fprintf(pysamerr, "         -s FLOAT fraction of templates to subsample; integer part as seed [-1]\n");
        fprintf(pysamerr, "         -?       longer help\n");
        fprintf(pysamerr, "\n");
        if (is_long_help)
@@ -351,3 +340,69 @@ int main_import(int argc, char *argv[])
        free(argv2);
        return ret;
 }
+
+int8_t seq_comp_table[16] = { 0, 8, 4, 12, 2, 10, 9, 14, 1, 6, 5, 13, 3, 11, 7, 15 };
+
+int main_bam2fq(int argc, char *argv[])
+{
+       bamFile fp;
+       bam_header_t *h;
+       bam1_t *b;
+       int8_t *buf;
+       int max_buf;
+       if (argc == 1) {
+               fprintf(pysamerr, "Usage: samtools bam2fq <in.bam>\n");
+               return 1;
+       }
+       fp = strcmp(argv[1], "-")? bam_open(argv[1], "r") : bam_dopen(fileno(stdin), "r");
+       if (fp == 0) return 1;
+       h = bam_header_read(fp);
+       b = bam_init1();
+       buf = 0;
+       max_buf = 0;
+       while (bam_read1(fp, b) >= 0) {
+               int i, qlen = b->core.l_qseq;
+               uint8_t *seq;
+               putchar('@'); fputs(bam1_qname(b), stdout);
+               if ((b->core.flag & 0x40) && !(b->core.flag & 0x80)) puts("/1");
+               else if ((b->core.flag & 0x80) && !(b->core.flag & 0x40)) puts("/2");
+               else putchar('\n');
+               if (max_buf < qlen + 1) {
+                       max_buf = qlen + 1;
+                       kroundup32(max_buf);
+                       buf = realloc(buf, max_buf);
+               }
+               buf[qlen] = 0;
+               seq = bam1_seq(b);
+               for (i = 0; i < qlen; ++i)
+                       buf[i] = bam1_seqi(seq, i);
+               if (b->core.flag & 16) { // reverse complement
+                       for (i = 0; i < qlen>>1; ++i) {
+                               int8_t t = seq_comp_table[buf[qlen - 1 - i]];
+                               buf[qlen - 1 - i] = seq_comp_table[buf[i]];
+                               buf[i] = t;
+                       }
+                       if (qlen&1) buf[i] = seq_comp_table[buf[i]];
+               }
+               for (i = 0; i < qlen; ++i)
+                       buf[i] = bam_nt16_rev_table[buf[i]];
+               puts((char*)buf);
+               puts("+");
+               seq = bam1_qual(b);
+               for (i = 0; i < qlen; ++i)
+                       buf[i] = 33 + seq[i];
+               if (b->core.flag & 16) { // reverse
+                       for (i = 0; i < qlen>>1; ++i) {
+                               int8_t t = buf[qlen - 1 - i];
+                               buf[qlen - 1 - i] = buf[i];
+                               buf[i] = t;
+                       }
+               }
+               puts((char*)buf);
+       }
+       free(buf);
+       bam_destroy1(b);
+       bam_header_destroy(h);
+       bam_close(fp);
+       return 0;
+}
index dc8e627ec5382382d77ac3860c401d88253cf3af..5f3d655e21a969e8d0c43fb9f122e1bfab75d11d 100644 (file)
@@ -54,10 +54,15 @@ static void add_pair(bam_sample_t *sm, khash_t(sm) *sm2id, const char *key, cons
 int bam_smpl_add(bam_sample_t *sm, const char *fn, const char *txt)
 {
        const char *p = txt, *q, *r;
-       kstring_t buf;
+       kstring_t buf, first_sm;
        int n = 0;
        khash_t(sm) *sm2id = (khash_t(sm)*)sm->sm2id;
+       if (txt == 0) {
+               add_pair(sm, sm2id, fn, fn);
+               return 0;
+       }
        memset(&buf, 0, sizeof(kstring_t));
+    memset(&first_sm, 0, sizeof(kstring_t));
        while ((q = strstr(p, "@RG")) != 0) {
                p = q + 3;
                r = q = 0;
@@ -71,12 +76,21 @@ int bam_smpl_add(bam_sample_t *sm, const char *fn, const char *txt)
                        oq = *u; or = *v; *u = *v = '\0';
                        buf.l = 0; kputs(fn, &buf); kputc('/', &buf); kputs(q, &buf);
                        add_pair(sm, sm2id, buf.s, r);
+            if ( !first_sm.s )
+                kputs(r,&first_sm); 
                        *u = oq; *v = or;
                } else break;
                p = q > r? q : r;
                ++n;
        }
        if (n == 0) add_pair(sm, sm2id, fn, fn);
+    // If there is only one RG tag present in the header and reads are not annotated, don't refuse to work but
+    //  use the tag instead.
+    else if ( n==1 && first_sm.s )
+        add_pair(sm,sm2id,fn,first_sm.s);
+    if ( first_sm.s )
+        free(first_sm.s);
+
 //     add_pair(sm, sm2id, fn, fn);
        free(buf.s);
        return 0;
index 4f9b15a8dfa6e3b46ffa3141fc9fd7b0a9d7d305..0f060721e01acc0900c100060855eac084584aa6 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,6 @@ import version
 version = version.__version__
 
 samtools_exclude = ( "bamtk.c", "razip.c", "bgzip.c", 
-                     "bam_reheader.c", 
                      "main.c", "calDepth.c", "bam2bed.c",
                      "wgsim.c", "md5fa.c", "maq2sam.c",)
 samtools_dest = os.path.abspath( "samtools" )
diff --git a/tabix/msvc_compat.h b/tabix/msvc_compat.h
deleted file mode 100644 (file)
index 624cc99..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Windows-specific code, include with:\r
-// #ifdef _MSC_VER\r
-// #include <msvc_compat.h>\r
-// #endif\r
-\r
-//#define _CRT_SECURE_NO_WARNINGS\r
-#ifndef MSVC_COMPAT_H\r
-#define MSVC_COMPAT_H\r
-\r
-#define inline __inline\r
-#define __func__ __FUNCTION__\r
-\r
-#include <float.h>\r
-#define isnan _isnan\r
-static int isinf(double x) {\r
-    int y = _finite(x);\r
-    if(y == 0) {\r
-       return 0;\r
-    } else {\r
-       return 1;\r
-    }\r
-}\r
-#define alloca _alloca\r
-#define atoll _atoi64\r
-\r
-#define ftello ftell\r
-
-typedef int bool;\r
-\r
-static int R_OK = 4;
-\r
-#ifndef lgamma\r
-/* Log gamma function\r
- * \log{\Gamma(z)}\r
- * AS245, 2nd algorithm, http://lib.stat.cmu.edu/apstat/245\r
- */\r
-static double lgamma(double z)\r
-{\r
-       double x = 0;\r
-       x += 0.1659470187408462e-06 / (z+7);\r
-       x += 0.9934937113930748e-05 / (z+6);\r
-       x -= 0.1385710331296526     / (z+5);\r
-       x += 12.50734324009056      / (z+4);\r
-       x -= 176.6150291498386      / (z+3);\r
-       x += 771.3234287757674      / (z+2);\r
-       x -= 1259.139216722289      / (z+1);\r
-       x += 676.5203681218835      / z;\r
-       x += 0.9999999999995183;\r
-       return log(x) - 5.58106146679532777 - z + (z-0.5) * log(z+6.5);\r
-}\r
-#endif\r
-\r
-#ifndef M_LN10\r
-#define        M_LN10   2.30258509299404568402\r
-#endif\r
-#ifndef M_LN2\r
-#define        M_LN2   0.69314718055994530942\r
-#endif\r
-
-#endif\r
index a1ca7a019b3df50703d1978d24ec3db89c56d90d..473158ee0a885ae50c451d05ead03b79b1226e06 100644 (file)
@@ -1,4 +1,11 @@
-import sys
+## This script contains some example code 
+## illustrating ways to to use the pysam 
+## interface to samtools.
+##
+## The unit tests in the script pysam_test.py
+## contain more examples.
+##
+
 import pysam
 
 samfile = pysam.Samfile( "ex1.bam", "rb" )
@@ -34,20 +41,8 @@ print "########## pileup with callback ################"
 def my_pileup_callback( column ): print str(column)
 samfile.pileup( region="chr1:10-200", callback=my_pileup_callback )
 
-print "##########iterator row #################"
-iter = pysam.IteratorRow( samfile, 0, 10, 200)
-for x in iter: print str(x)
-
-print "##########iterator col #################"
-iter = pysam.IteratorColumn( samfile, 0, 10, 200 )
-for x in iter: print str(x)
-
-print "#########row all##################"
-iter = pysam.IteratorRowAll( samfile )
-for x in iter: print str(x)
 
-
-print "###################"
+print "########### Using a callback object ###### "
 
 class Counter:
     mCounts = 0
@@ -55,61 +50,24 @@ class Counter:
         self.mCounts += 1
 
 c = Counter()
-samfile.fetch( "chr1:10-200", c )
+samfile.fetch( region = "chr1:10-200", callback = c )
 print "counts=", c.mCounts
 
-sys.exit(0)
-print samfile.getTarget( 0 )
-print samfile.getTarget( 1 )
+print "########### Calling a samtools command line function ############"
 
-for p in pysam.pileup( "-c", "ex1.bam" ):
+for p in pysam.mpileup( "-c", "ex1.bam" ):
     print str(p)
 
-print pysam.pileup.getMessages()
-
-for p in pysam.pileup( "-c", "ex1.bam", raw=True ):
-    print str(p),
-
-
-
-print "###########################"
-
-samfile = pysam.Samfile( "ex2.sam.gz", "r" )
-
-print "num targets=", samfile.getNumTargets()
-
-iter = pysam.IteratorRowAll( samfile )
-for x in iter: print str(x)
-
-samfile.close()
-
-print "###########################"
-samfile = pysam.Samfile( "ex2.sam.gz", "r" )
-def my_fetch_callback( alignment ):
-    print str(alignment)
-
-try:
-    samfile.fetch( "chr1:10-20", my_fetch_callback )
-except AssertionError:
-    print "caught fetch exception"
-
-samfile.close()
+print pysam.mpileup.getMessages()
 
-print "###########################"
-samfile = pysam.Samfile( "ex2.sam.gz", "r" )
-def my_pileup_callback( pileups ):
-    print str(pileups)
-try:
-    samfile.pileup( "chr1:10-20", my_pileup_callback )
-except NotImplementedError:
-    print "caught pileup exception"
+print "########### Investigating headers #######################"
 
 # playing arount with headers
 samfile = pysam.Samfile( "ex3.sam", "r" )
-print samfile.targets
+print samfile.references
 print samfile.lengths
 print samfile.text
-print samdile.header
+print samfile.header
 header = samfile.header
 samfile.close()
 
index d2bf4150de58551accb107f1822e85912c7c58d5..6938a977130436534a5dcbd80383a29053c3b0c4 100755 (executable)
@@ -12,7 +12,9 @@ import itertools, collections
 import subprocess
 import shutil
 import logging
+
 SAMTOOLS="samtools"
+WORKDIR="pysam_test_work"
 
 def checkBinaryEqual( filename1, filename2 ):
     '''return true if the two files are binary equal.'''
@@ -65,56 +67,131 @@ class BinaryTest(unittest.TestCase):
     first_time = True
 
     # a list of commands to test
-    mCommands = \
-        { "faidx" : \
-        ( 
-            ("ex1.fa.fai", "faidx ex1.fa"), 
-            ("pysam_ex1.fa.fai", (pysam.faidx, "ex1.fa") ),
-            ),
-          "import" :
+    commands = \
+        { 
+          "view" :
               (
-                ("ex1.bam", "import ex1.fa.fai ex1.sam.gz ex1.bam" ),
-                ("pysam_ex1.bam", (pysam.samimport, "ex1.fa.fai ex1.sam.gz pysam_ex1.bam") ),
+                ("ex1.view", "view ex1.bam > ex1.view"),
+                ("pysam_ex1.view", (pysam.view, "ex1.bam" ) ),
+                ),
+          "view2" :
+              (
+                ("ex1.view", "view -bT ex1.fa -o ex1.view2 ex1.sam"),
+                # note that -o ex1.view2 throws exception.
+                ("pysam_ex1.view", (pysam.view, "-bT ex1.fa -oex1.view2 ex1.sam" ) ),
+                ),
+          "sort" :
+              (
+                ( "ex1.sort.bam", "sort ex1.bam ex1.sort" ),
+                ( "pysam_ex1.sort.bam", (pysam.sort, "ex1.bam pysam_ex1.sort" ) ),
+                ),
+          "mpileup" :
+              (
+                ("ex1.pileup", "mpileup ex1.bam > ex1.pileup" ),
+                ("pysam_ex1.mpileup", (pysam.mpileup, "ex1.bam" ) ),
+                ),
+          "depth" :
+              (
+                ("ex1.depth", "depth ex1.bam > ex1.depth" ),
+                ("pysam_ex1.depth", (pysam.depth, "ex1.bam" ) ),
+                ),
+          "faidx" : 
+              ( 
+                ("ex1.fa.fai", "faidx ex1.fa"), 
+                ("pysam_ex1.fa.fai", (pysam.faidx, "ex1.fa") ),
                 ),
           "index":
               (
                 ("ex1.bam.bai", "index ex1.bam" ),
                 ("pysam_ex1.bam.bai", (pysam.index, "pysam_ex1.bam" ) ),
                 ),
-          "pileup1" :
-          (
-                ("ex1.pileup", "pileup -cf ex1.fa ex1.bam > ex1.pileup" ),
-                ("pysam_ex1.pileup", (pysam.pileup, "-c -f ex1.fa ex1.bam" ) )
+          "idxstats" :
+              ( 
+                ("ex1.idxstats", "idxstats ex1.bam > ex1.idxstats" ),
+                ("pysam_ex1.idxstats", (pysam.idxstats, "pysam_ex1.bam" ) ),
                 ),
-          "pileup2" :
-          (
-                ("ex1.glf", "pileup -gf ex1.fa ex1.bam > ex1.glf" ),
-                ("pysam_ex1.glf", (pysam.pileup, "-g -f ex1.fa ex1.bam" ) )
+          "fixmate" :
+              (
+                ("ex1.fixmate", "fixmate ex1.bam ex1.fixmate" ),
+                ("pysam_ex1.fixmate", (pysam.fixmate, "pysam_ex1.bam pysam_ex1.fixmate") ),
                 ),
-          "glfview" :
-        (
-                ("ex1.glfview", "glfview ex1.glf > ex1.glfview"),
-                ("pysam_ex1.glfview", (pysam.glfview, "ex1.glf" ) ),
+          "flagstat" :
+              (
+                ("ex1.flagstat", "flagstat ex1.bam > ex1.flagstat" ),
+                ("pysam_ex1.flagstat", (pysam.flagstat, "pysam_ex1.bam") ),
                 ),
-          "view" :
-        (
-                ("ex1.view", "view ex1.bam > ex1.view"),
-                ("pysam_ex1.view", (pysam.view, "ex1.bam" ) ),
+          "calmd" :
+              (
+                ("ex1.calmd", "calmd ex1.bam ex1.fa > ex1.calmd" ),
+                ("pysam_ex1.calmd", (pysam.calmd, "pysam_ex1.bam ex1.fa") ),
                 ),
-          "view2" :
-        (
-                ("ex1.view", "view -bT ex1.fa -o ex1.view2 ex1.sam"),
-                # note that -o ex1.view2 throws exception.
-                ("pysam_ex1.view", (pysam.view, "-bT ex1.fa -oex1.view2 ex1.sam" ) ),
+          "merge" :
+              (
+                ("ex1.merge", "merge -f ex1.merge ex1.bam ex1.bam" ),
+                # -f option does not work - following command will cause the subsequent
+                # command to fail
+                ("pysam_ex1.merge", (pysam.merge, "pysam_ex1.merge pysam_ex1.bam pysam_ex1.bam") ),
+                ),
+          "rmdup" :
+              (
+                ("ex1.rmdup", "rmdup ex1.bam ex1.rmdup" ),
+                ("pysam_ex1.rmdup", (pysam.rmdup, "pysam_ex1.bam pysam_ex1.rmdup" )),
+                ),
+          "reheader" :
+              (
+                ( "ex1.reheader", "reheader ex1.bam ex1.bam > ex1.reheader"),
+                ( "pysam_ex1.reheader", (pysam.reheader, "ex1.bam ex1.bam" ) ),
+                ),
+          "cat":
+              (
+                ( "ex1.cat", "cat ex1.bam ex1.bam > ex1.cat"),
+                ( "pysam_ex1.cat", (pysam.cat, "ex1.bam ex1.bam" ) ),
+                ),
+          "targetcut":
+              (
+                ("ex1.targetcut", "targetcut ex1.bam > ex1.targetcut" ),
+                ("pysam_ex1.targetcut", (pysam.targetcut, "pysam_ex1.bam") ),
+                ),
+          "phase":
+              (
+                ("ex1.phase", "phase ex1.bam > ex1.phase" ),
+                ("pysam_ex1.phase", (pysam.phase, "pysam_ex1.bam") ),
+                ),
+          "import" :
+              (
+                ("ex1.bam", "import ex1.fa.fai ex1.sam.gz ex1.bam" ),
+                ("pysam_ex1.bam", (pysam.samimport, "ex1.fa.fai ex1.sam.gz pysam_ex1.bam") ),
+                ),
+          "bam2fq":
+              (
+                ("ex1.bam2fq", "bam2fq ex1.bam > ex1.bam2fq" ),
+                ("pysam_ex1.bam2fq", (pysam.bam2fq, "pysam_ex1.bam") ),
                 ),
         }
 
     # some tests depend on others. The order specifies in which order
     # the samtools commands are executed.
-    mOrder = ('faidx', 'import', 'index', 
-              'pileup1', 'pileup2', 
+    # The first three (faidx, import, index) need to be in that order, 
+    # the rest is arbitrary.
+    order = ('faidx', 'import', 'index', 
+              # 'pileup1', 'pileup2', deprecated
               # 'glfview', deprecated
-              'view', 'view2' )
+              'view', 'view2',
+              'sort',
+              'mpileup',
+              'depth',
+              'idxstats',
+              'fixmate',
+              'flagstat',
+              # 'calmd',
+              'merge',
+              'rmdup',
+              'reheader',
+              'cat',
+              'targetcut',
+              'phase',
+              'bam2fq',
+              )
 
     def setUp( self ):
         '''setup tests. 
@@ -124,25 +201,51 @@ class BinaryTest(unittest.TestCase):
         files.
         '''
         if BinaryTest.first_time:
-            # copy the source 
-            shutil.copy( "ex1.fa", "pysam_ex1.fa" )
 
-            for label in self.mOrder:
-                command = self.mCommands[label]
+            # remove previous files
+            if os.path.exists( WORKDIR ):
+                shutil.rmtree( WORKDIR )
+                
+            # copy the source files to WORKDIR
+            os.makedirs( WORKDIR )
+
+            shutil.copy( "ex1.fa", os.path.join( WORKDIR, "pysam_ex1.fa" ) )
+            shutil.copy( "ex1.fa", os.path.join( WORKDIR, "ex1.fa" ) )
+            shutil.copy( "ex1.sam.gz", os.path.join( WORKDIR, "ex1.sam.gz" ) )
+            shutil.copy( "ex1.sam", os.path.join( WORKDIR, "ex1.sam" ) )
+
+            # cd to workdir
+            savedir = os.getcwd()
+            os.chdir( WORKDIR )
+            
+            for label in self.order:
+                command = self.commands[label]
                 samtools_target, samtools_command = command[0]
-                pysam_target, pysam_command = command[1]
+                try:
+                    pysam_target, pysam_command = command[1]
+                except ValueError, msg:
+                    raise ValueError( "error while setting up %s=%s: %s" %\
+                                          (label, command, msg) )
                 runSamtools( " ".join( (SAMTOOLS, samtools_command )))
                 pysam_method, pysam_options = pysam_command
-                output = pysam_method( *pysam_options.split(" "), raw=True)
+                try:
+                    output = pysam_method( *pysam_options.split(" "), raw=True)
+                except pysam.SamtoolsError, msg:
+                    raise pysam.SamtoolsError( "error while executing %s: options=%s: msg=%s" %\
+                                                   (label, pysam_options, msg) )
                 if ">" in samtools_command:
                     outfile = open( pysam_target, "wb" )
                     for line in output: outfile.write( line )
                     outfile.close()
-
+                    
+            os.chdir( savedir )
             BinaryTest.first_time = False
 
+            
+
         samtools_version = getSamtoolsVersion()
 
+        
         def _r( s ):
             # patch - remove any of the alpha/beta suffixes, i.e., 0.1.12a -> 0.1.12
             if s.count('-') > 0: s = s[0:s.find('-')]
@@ -155,7 +258,9 @@ class BinaryTest(unittest.TestCase):
 
     def checkCommand( self, command ):
         if command:
-            samtools_target, pysam_target = self.mCommands[command][0][0], self.mCommands[command][1][0]
+            samtools_target, pysam_target = self.commands[command][0][0], self.commands[command][1][0]
+            samtools_target = os.path.join( WORKDIR, samtools_target )
+            pysam_target = os.path.join( WORKDIR, pysam_target )
             self.assertTrue( checkBinaryEqual( samtools_target, pysam_target ), 
                              "%s failed: files %s and %s are not the same" % (command, samtools_target, pysam_target) )
             
@@ -164,12 +269,51 @@ class BinaryTest(unittest.TestCase):
 
     def testIndex( self ):
         self.checkCommand( "index" )
+
+    def testSort( self ):
+        self.checkCommand( "sort" )
+
+    def testMpileup( self ):
+        self.checkCommand( "mpileup" )
+
+    def testDepth( self ):
+        self.checkCommand( "depth" )
+
+    def testIdxstats( self ):
+        self.checkCommand( "idxstats" )
+
+    def testFixmate( self ):
+        self.checkCommand( "fixmate" )
+
+    def testFlagstat( self ):
+        self.checkCommand( "flagstat" )
         
-    def testPileup1( self ):
-        self.checkCommand( "pileup1" )
+    def testMerge( self ):
+        self.checkCommand( "merge" )
+
+    def testRmdup( self ):
+        self.checkCommand( "rmdup" )
+
+    def testReheader( self ):
+        self.checkCommand( "reheader" )
+
+    def testCat( self ):
+        self.checkCommand( "cat" )
+
+    def testTargetcut( self ):
+        self.checkCommand( "targetcut" )
+
+    def testPhase( self ):
+        self.checkCommand( "phase" )
+
+    def testBam2fq( self ):
+        self.checkCommand( "bam2fq" )
+
+    # def testPileup1( self ):
+    #     self.checkCommand( "pileup1" )
     
-    def testPileup2( self ):
-        self.checkCommand( "pileup2" )
+    def testPileup2( self ):
+        self.checkCommand( "pileup2" )
 
     # deprecated
     # def testGLFView( self ):
@@ -182,27 +326,24 @@ class BinaryTest(unittest.TestCase):
         self.assertRaises( IOError, pysam.index, "exdoesntexist.bam" )
 
     def __del__(self):
-        return
-        for label, command in self.mCommands.iteritems():
-            samtools_target, samtools_command = command[0]
-            pysam_target, pysam_command = command[1]
-            if os.path.exists( samtools_target): os.remove( samtools_target )
-            if os.path.exists( pysam_target): os.remove( pysam_target )
-        if os.path.exists( "pysam_ex1.fa" ): os.remove( "pysam_ex1.fa" )
+        if os.path.exists( WORKDIR ):
+            shutil.rmtree( WORKDIR )
 
 class IOTest(unittest.TestCase):
     '''check if reading samfile and writing a samfile are consistent.'''
 
     def checkEcho( self, input_filename, reference_filename, 
                    output_filename, 
-                   input_mode, output_mode, use_template = True):
+                   input_mode, output_mode, use_template = True ):
         '''iterate through *input_filename* writing to *output_filename* and
         comparing the output to *reference_filename*. 
         
         The files are opened according to the *input_mode* and *output_mode*.
 
         If *use_template* is set, the header is copied from infile using the
-        template mechanism, otherwise target names and lengths are passed explicitely. 
+        template mechanism, otherwise target names and lengths are passed 
+        explicitely. 
+
         '''
 
         infile = pysam.Samfile( input_filename, input_mode )
@@ -211,7 +352,8 @@ class IOTest(unittest.TestCase):
         else:
             outfile = pysam.Samfile( output_filename, output_mode, 
                                      referencenames = infile.references,
-                                     referencelengths = infile.lengths )
+                                     referencelengths = infile.lengths,
+                                     add_sq_text = False )
 
         iter = infile.fetch()
         for x in iter: outfile.write( x )
@@ -257,6 +399,18 @@ class IOTest(unittest.TestCase):
         self.checkEcho( input_filename, reference_filename, output_filename,
                         "r", "w" )
 
+    def testReadSamWithoutHeaderWriteSamWithoutHeader( self ):
+        
+        input_filename = "ex1.sam"
+        output_filename = "pysam_ex1.sam"
+        reference_filename = "ex1.sam"
+
+        # disabled - reading from a samfile without header
+        # is not implemented.
+        
+        # self.checkEcho( input_filename, reference_filename, output_filename,
+        #                 "r", "w" )
+
     def testFetchFromClosedFile( self ):
 
         samfile = pysam.Samfile( "ex1.bam", "rb" )
@@ -283,14 +437,22 @@ class IOTest(unittest.TestCase):
         self.assertEqual( 0, samfile.write(None) )
 
     def testAutoDetection( self ):
-        samfile = pysam.Samfile( "ex3.bam" )
-        samfile.fetch()
+        '''test if autodetection works.'''
+
+        samfile = pysam.Samfile( "ex3.sam" )
+        self.assertRaises( ValueError, samfile.fetch, 'chr1' )
         samfile.close()
 
-        samfile = pysam.Samfile( "ex3.sam")
-        samfile.fetch()
+        samfile = pysam.Samfile( "ex3.bam" )
+        samfile.fetch('chr1')
         samfile.close()
 
+    def testReadingFromSamFileWithoutHeader( self ):
+        '''read from samfile without header.
+        '''
+        samfile = pysam.Samfile( "ex7.sam" )
+        self.assertRaises( NotImplementedError, samfile.__iter__ )
+
     def testReadingFromFileWithoutIndex( self ):
         '''read from bam file without index.'''
 
@@ -299,6 +461,67 @@ class IOTest(unittest.TestCase):
         self.assertRaises( ValueError, samfile.fetch )
         self.assertEqual( len(list( samfile.fetch(until_eof = True) )), 3270 )
 
+    def testReadingUniversalFileMode( self ):
+        '''read from samfile without header.
+        '''
+
+        input_filename = "ex2.sam"
+        output_filename = "pysam_ex2.sam"
+        reference_filename = "ex1.sam"
+
+        self.checkEcho( input_filename, reference_filename, output_filename,
+                        "rU", "w" )
+
+class TestFloatTagBug( unittest.TestCase ):
+    '''see issue 71'''
+
+    def testFloatTagBug( self ): 
+        '''a float tag before another exposed a parsing bug in bam_aux_get - expected to fail
+
+        This test is expected to fail until samtools is fixed.
+        '''
+        samfile = pysam.Samfile("tag_bug.bam")
+        read = samfile.fetch(until_eof=True).next()
+        self.assertTrue( ('XC',1) in read.tags )
+        self.assertEqual(read.opt('XC'), 1)
+
+class TestTagParsing( unittest.TestCase ):
+    '''tests checking the accuracy of tag setting and retrieval.'''
+
+    def makeRead( self ):
+        a = pysam.AlignedRead()
+        a.qname = "read_12345"
+        a.tid = 0
+        a.seq="ACGT" * 3
+        a.flag = 0
+        a.rname = 0
+        a.pos = 1
+        a.mapq = 20
+        a.cigar = ( (0,10), (2,1), (0,25) )
+        a.mrnm = 0
+        a.mpos=200
+        a.isize = 0
+       a.qual ="1234" * 3
+        # todo: create tags
+        return a
+
+    def testNegativeIntegers( self ):
+        x = -2
+        aligned_read = self.makeRead()
+        aligned_read.tags = [("XD", int(x) ) ]
+        print aligned_read.tags
+
+    def testNegativeIntegers2( self ):
+        x = -2
+        r = self.makeRead()
+        r.tags = [("XD", int(x) ) ]
+        outfile = pysam.Samfile( "test.bam",
+                                 "wb",
+                                 referencenames = ("chr1",),
+                                 referencelengths = (1000,) )
+        outfile.write (r )
+        outfile.close()
+
 class TestIteratorRow(unittest.TestCase):
 
     def setUp(self):
@@ -441,14 +664,20 @@ class TestAlignedReadFromBam(unittest.TestCase):
     def testARmrnm(self):
         self.assertEqual( self.reads[0].mrnm, 0, "mate reference sequence name mismatch in read 1: %s != %s" % (self.reads[0].mrnm, 0) )
         self.assertEqual( self.reads[1].mrnm, 1, "mate reference sequence name mismatch in read 2: %s != %s" % (self.reads[1].mrnm, 1) )
+        self.assertEqual( self.reads[0].rnext, 0, "mate reference sequence name mismatch in read 1: %s != %s" % (self.reads[0].rnext, 0) )
+        self.assertEqual( self.reads[1].rnext, 1, "mate reference sequence name mismatch in read 2: %s != %s" % (self.reads[1].rnext, 1) )
 
     def testARmpos(self):
         self.assertEqual( self.reads[0].mpos, 200-1, "mate mapping position mismatch in read 1: %s != %s" % (self.reads[0].mpos, 200-1) )
         self.assertEqual( self.reads[1].mpos, 500-1, "mate mapping position mismatch in read 2: %s != %s" % (self.reads[1].mpos, 500-1) )
+        self.assertEqual( self.reads[0].pnext, 200-1, "mate mapping position mismatch in read 1: %s != %s" % (self.reads[0].pnext, 200-1) )
+        self.assertEqual( self.reads[1].pnext, 500-1, "mate mapping position mismatch in read 2: %s != %s" % (self.reads[1].pnext, 500-1) )
 
     def testARisize(self):
         self.assertEqual( self.reads[0].isize, 167, "insert size mismatch in read 1: %s != %s" % (self.reads[0].isize, 167) )
         self.assertEqual( self.reads[1].isize, 412, "insert size mismatch in read 2: %s != %s" % (self.reads[1].isize, 412) )
+        self.assertEqual( self.reads[0].tlen, 167, "insert size mismatch in read 1: %s != %s" % (self.reads[0].tlen, 167) )
+        self.assertEqual( self.reads[1].tlen, 412, "insert size mismatch in read 2: %s != %s" % (self.reads[1].tlen, 412) )
 
     def testARseq(self):
         self.assertEqual( self.reads[0].seq, "AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "sequence mismatch in read 1: %s != %s" % (self.reads[0].seq, "AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG") )
@@ -671,10 +900,16 @@ class TestWrongFormat(unittest.TestCase):
         self.assertRaises( ValueError, pysam.Samfile, 'ex1.sam', 'rb' )
 
     def testOpenBamAsSam( self ):
-        self.assertRaises( ValueError, pysam.Samfile, 'ex1.bam', 'r' )
+        # test fails, needs to be implemented.
+        # sam.fetch() fails on reading, not on opening
+        # self.assertRaises( ValueError, pysam.Samfile, 'ex1.bam', 'r' )
+        pass
 
     def testOpenFastaAsSam( self ):
-        self.assertRaises( ValueError, pysam.Samfile, 'ex1.fa', 'r' )
+        # test fails, needs to be implemented.
+        # sam.fetch() fails on reading, not on opening
+        # self.assertRaises( ValueError, pysam.Samfile, 'ex1.fa', 'r' )
+        pass
 
     def testOpenFastaAsBam( self ):
         self.assertRaises( ValueError, pysam.Samfile, 'ex1.fa', 'rb' )
@@ -753,7 +988,7 @@ class TestAlignedRead(unittest.TestCase):
         self.assertEqual( a.rname, 0 )
         self.assertEqual( a.mapq, 0 )
         self.assertEqual( a.cigar, None )
-        self.assertEqual( a.tags, None )
+        self.assertEqual( a.tags, [] )
         self.assertEqual( a.mrnm, 0 )
         self.assertEqual( a.mpos, 0 )
         self.assertEqual( a.isize, 0 )
@@ -1088,107 +1323,107 @@ class TestLargeOptValues( unittest.TestCase ):
         samfile = pysam.Samfile("ex10.bam", "rb")
         self.check( samfile )
 
-class TestSNPCalls( unittest.TestCase ):
-    '''test pysam SNP calling ability.'''
-
-    def checkEqual( self, a, b ):
-        for x in ("reference_base", 
-                  "pos",
-                  "genotype",
-                  "consensus_quality",
-                  "snp_quality",
-                  "mapping_quality",
-                  "coverage" ):
-            self.assertEqual( getattr(a, x), getattr(b,x), "%s mismatch: %s != %s\n%s\n%s" % 
-                              (x, getattr(a, x), getattr(b,x), str(a), str(b)))
-
-    def testAllPositionsViaIterator( self ):
-        samfile = pysam.Samfile( "ex1.bam", "rb")  
-        fastafile = pysam.Fastafile( "ex1.fa" )
-        try: 
-            refs = [ x for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ) if x.reference_base != "*"]
-        except pysam.SamtoolsError:
-            pass
-
-        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
-        calls = list(pysam.IteratorSNPCalls(i))
-        for x,y in zip( refs, calls ):
-            self.checkEqual( x, y )
-
-    def testPerPositionViaIterator( self ):
-        # test pileup for each position. This is a slow operation
-        # so this test is disabled 
-        return
-        samfile = pysam.Samfile( "ex1.bam", "rb")  
-        fastafile = pysam.Fastafile( "ex1.fa" )
-        for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ):
-            if x.reference_base == "*": continue
-            i = samfile.pileup( x.chromosome, x.pos, x.pos+1,
-                                fastafile = fastafile,
-                                stepper = "samtools" )
-            z = [ zz for zz in pysam.IteratorSamtools(i) if zz.pos == x.pos ]
-            self.assertEqual( len(z), 1 )
-            self.checkEqual( x, z[0] )
-
-    def testPerPositionViaCaller( self ):
-        # test pileup for each position. This is a fast operation
-        samfile = pysam.Samfile( "ex1.bam", "rb")  
-        fastafile = pysam.Fastafile( "ex1.fa" )
-        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
-        caller = pysam.SNPCaller( i )
-
-        for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ):
-            if x.reference_base == "*": continue
-            call = caller.call( x.chromosome, x.pos )
-            self.checkEqual( x, call )
-
-class TestIndelCalls( unittest.TestCase ):
-    '''test pysam indel calling.'''
-
-    def checkEqual( self, a, b ):
-
-        for x in ("pos",
-                  "genotype",
-                  "consensus_quality",
-                  "snp_quality",
-                  "mapping_quality",
-                  "coverage",
-                  "first_allele",
-                  "second_allele",
-                  "reads_first",
-                  "reads_second",
-                  "reads_diff"):
-            if b.genotype == "*/*" and x == "second_allele":
-                # ignore test for second allele (positions chr2:439 and chr2:1512)
-                continue
-            self.assertEqual( getattr(a, x), getattr(b,x), "%s mismatch: %s != %s\n%s\n%s" % 
-                              (x, getattr(a, x), getattr(b,x), str(a), str(b)))
-
-    def testAllPositionsViaIterator( self ):
-
-        samfile = pysam.Samfile( "ex1.bam", "rb")  
-        fastafile = pysam.Fastafile( "ex1.fa" )
-        try: 
-            refs = [ x for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ) if x.reference_base == "*"]
-        except pysam.SamtoolsError:
-            pass
-
-        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
-        calls = [ x for x in list(pysam.IteratorIndelCalls(i)) if x != None ]
-        for x,y in zip( refs, calls ):
-            self.checkEqual( x, y )
-
-    def testPerPositionViaCaller( self ):
-        # test pileup for each position. This is a fast operation
-        samfile = pysam.Samfile( "ex1.bam", "rb")  
-        fastafile = pysam.Fastafile( "ex1.fa" )
-        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
-        caller = pysam.IndelCaller( i )
-
-        for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ):
-            if x.reference_base != "*": continue
-            call = caller.call( x.chromosome, x.pos )
-            self.checkEqual( x, call )
+class TestSNPCalls( unittest.TestCase ):
+    '''test pysam SNP calling ability.'''
+
+    def checkEqual( self, a, b ):
+        for x in ("reference_base", 
+                  "pos",
+                  "genotype",
+                  "consensus_quality",
+                  "snp_quality",
+                  "mapping_quality",
+                  "coverage" ):
+            self.assertEqual( getattr(a, x), getattr(b,x), "%s mismatch: %s != %s\n%s\n%s" % 
+                              (x, getattr(a, x), getattr(b,x), str(a), str(b)))
+
+    def testAllPositionsViaIterator( self ):
+        samfile = pysam.Samfile( "ex1.bam", "rb")  
+        fastafile = pysam.Fastafile( "ex1.fa" )
+        try: 
+            refs = [ x for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ) if x.reference_base != "*"]
+        except pysam.SamtoolsError:
+            pass
+
+        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
+        calls = list(pysam.IteratorSNPCalls(i))
+        for x,y in zip( refs, calls ):
+            self.checkEqual( x, y )
+
+    def testPerPositionViaIterator( self ):
+        # test pileup for each position. This is a slow operation
+        # so this test is disabled 
+        return
+        samfile = pysam.Samfile( "ex1.bam", "rb")  
+        fastafile = pysam.Fastafile( "ex1.fa" )
+        for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ):
+            if x.reference_base == "*": continue
+            i = samfile.pileup( x.chromosome, x.pos, x.pos+1,
+                                fastafile = fastafile,
+                                stepper = "samtools" )
+            z = [ zz for zz in pysam.IteratorSamtools(i) if zz.pos == x.pos ]
+            self.assertEqual( len(z), 1 )
+            self.checkEqual( x, z[0] )
+
+    def testPerPositionViaCaller( self ):
+        # test pileup for each position. This is a fast operation
+        samfile = pysam.Samfile( "ex1.bam", "rb")  
+        fastafile = pysam.Fastafile( "ex1.fa" )
+        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
+        caller = pysam.SNPCaller( i )
+
+        for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ):
+            if x.reference_base == "*": continue
+            call = caller.call( x.chromosome, x.pos )
+            self.checkEqual( x, call )
+
+class TestIndelCalls( unittest.TestCase ):
+    '''test pysam indel calling.'''
+
+    def checkEqual( self, a, b ):
+
+        for x in ("pos",
+                  "genotype",
+                  "consensus_quality",
+                  "snp_quality",
+                  "mapping_quality",
+                  "coverage",
+                  "first_allele",
+                  "second_allele",
+                  "reads_first",
+                  "reads_second",
+                  "reads_diff"):
+            if b.genotype == "*/*" and x == "second_allele":
+                # ignore test for second allele (positions chr2:439 and chr2:1512)
+                continue
+            self.assertEqual( getattr(a, x), getattr(b,x), "%s mismatch: %s != %s\n%s\n%s" % 
+                              (x, getattr(a, x), getattr(b,x), str(a), str(b)))
+
+    def testAllPositionsViaIterator( self ):
+
+        samfile = pysam.Samfile( "ex1.bam", "rb")  
+        fastafile = pysam.Fastafile( "ex1.fa" )
+        try: 
+            refs = [ x for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ) if x.reference_base == "*"]
+        except pysam.SamtoolsError:
+            pass
+
+        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
+        calls = [ x for x in list(pysam.IteratorIndelCalls(i)) if x != None ]
+        for x,y in zip( refs, calls ):
+            self.checkEqual( x, y )
+
+    def testPerPositionViaCaller( self ):
+        # test pileup for each position. This is a fast operation
+        samfile = pysam.Samfile( "ex1.bam", "rb")  
+        fastafile = pysam.Fastafile( "ex1.fa" )
+        i = samfile.pileup( stepper = "samtools", fastafile = fastafile )
+        caller = pysam.IndelCaller( i )
+
+        for x in pysam.pileup( "-c", "-f", "ex1.fa", "ex1.bam" ):
+            if x.reference_base != "*": continue
+            call = caller.call( x.chromosome, x.pos )
+            self.checkEqual( x, call )
 
 class TestLogging( unittest.TestCase ):
     '''test around bug issue 42,
@@ -1271,6 +1506,13 @@ class TestSamfileUtilityFunctions( unittest.TestCase ):
                     self.assertEqual( read.pos, mate.mpos )
                     self.assertEqual( read.mpos, mate.pos )
 
+    def testIndexStats( self ):
+        '''test if total number of mapped/unmapped reads is correct.'''
+
+        samfile = pysam.Samfile( "ex1.bam", "rb" )
+        self.assertEqual( samfile.mapped, 3235 )
+        self.assertEqual( samfile.unmapped, 35 )
+
 class TestSamtoolsProxy( unittest.TestCase ):
     '''tests for sanity checking access to samtools functions.'''
 
index 207a59c6c125360655ac77192f43640903fc1c1d..2caa628660f74a4389a23bf8b09c8c9e55266dee 100644 (file)
@@ -127,7 +127,6 @@ class TestIteration( unittest.TestCase ):
                                  b.difference(a) ))
 
         for x, d in enumerate( zip( result, ref )):
-            
             self.assertEqual( d[0], d[1],
                               "unexpected results in pair %i: '%s', expected '%s'" % \
                                   (x, 
@@ -204,6 +203,17 @@ class TestIteration( unittest.TestCase ):
         header = list( self.tabix.header )
         self.assertEqual( ref, header )
 
+    def testReopening( self ):
+        '''test repeated opening of the same file.'''
+        def func1():
+            # opens any tabix file
+            inf = pysam.Tabixfile(self.filename)
+            return
+
+        for i in range(10000):
+            func1()
+
+
 class TestParser( unittest.TestCase ):
 
     filename = "example.gtf.gz" 
@@ -219,9 +229,16 @@ class TestParser( unittest.TestCase ):
             self.assertEqual( self.compare[x], list(r) )
             self.assertEqual( len(self.compare[x]), len(r) )
 
+            # test indexing
             for c in range(0,len(r)):
                 self.assertEqual( self.compare[x][c], r[c] )
 
+            # test slicing access
+            for c in range(0, len(r)-1):
+                for cc in range(c+1, len(r)):
+                    self.assertEqual( self.compare[x][c:cc],
+                                      r[c:cc] )
+
     def testWrite( self ):
         
         for x, r in enumerate(self.tabix.fetch( parser = pysam.asTuple() )):
@@ -250,10 +267,18 @@ class TestParser( unittest.TestCase ):
                 self.assertEqual( "\t".join(e), str(r) )
 
 class TestGTF( TestParser ):
+
     def testRead( self ):
 
         for x, r in enumerate(self.tabix.fetch( parser = pysam.asGTF() )):
-            self.assertEqual( "\t".join( self.compare[x]), str(r) )
+            c =  self.compare[x]
+            
+            self.assertEqual( len(c), len(r) )
+            self.assertEqual( "\t".join(c), str(r) )
+            self.assertTrue( r.gene_id.startswith("ENSG") )
+            if r.feature != "gene":
+                self.assertTrue( r.transcript_id.startswith("ENST") )
+            self.assertEqual( c[0], r.contig )
 
 class TestBed( unittest.TestCase ):
     filename = "example.bed.gz"
@@ -307,8 +332,8 @@ class TestVCF( TestParser ):
             c = self.compare[x]
             for y, field in enumerate( self.columns ):
                 if field == "pos":
-                    self.assertEqual( int(c[y])-1, getattr( r, field ) )
-                    self.assertEqual( int(c[y])-1, r.pos )
+                    self.assertEqual( int(c[y]) - 1, getattr( r, field ) )
+                    self.assertEqual( int(c[y]) - 1, r.pos )
                 else:
                     self.assertEqual( c[y], getattr( r, field ), 
                                       "mismatch in field %s: %s != %s" %\
@@ -323,12 +348,24 @@ class TestVCF( TestParser ):
         ncolumns = len(self.columns) 
 
         for x, r in enumerate(self.tabix.fetch( parser = pysam.asVCF() )):
+
             c = self.compare[x]
+
+            # check unmodified string
+            ref_string = "\t".join( c )
+            cmp_string = str(r)
+            self.assertEqual( ref_string, cmp_string )
+
+            # set fields and compare field-wise
             for y, field in enumerate( self.columns ):
                 if field == "pos":
-                    r.pos += 1
-                    self.assertEqual( int(c[y]), getattr( r, field ) )
-                    self.assertEqual( int(c[y]), r.pos )
+                    rpos = getattr( r, field )
+                    self.assertEqual( int(c[y]) - 1, rpos )
+                    self.assertEqual( int(c[y]) - 1, r.pos )
+                    # increment pos by 1
+                    setattr( r, field, rpos + 1 )
+                    self.assertEqual( getattr( r, field ), rpos + 1 )
+                    c[y] = str(int(c[y]) + 1 ) 
                 else:
                     setattr( r, field, "test_%i" % y)
                     c[y] = "test_%i" % y
@@ -342,7 +379,23 @@ class TestVCF( TestParser ):
                 c[ncolumns+y] = "test_%i" % y
                 r[y] = "test_%i" % y
                 self.assertEqual( c[ncolumns+y], r[y] )
+
+class TestVCF( TestParser ):
+
+    filename = "example.vcf40.gz"
+
+    def testOpening( self ):
+        while 1:
+            infile = pysam.Tabixfile( self.filename )
+            infile.close()
+
                 
+            # check strings
+            ref_string = "\t".join( c )
+            cmp_string = str(r)
+            
+            self.assertEqual( ref_string, cmp_string )
+
 if __name__ == "__main__":
 
     unittest.main()